From a7d83b701f64654d41d5828ce3cd2eb0db68cdd6 Mon Sep 17 00:00:00 2001 From: "Daniel J. Hofmann" Date: Fri, 26 Feb 2016 07:34:18 +0100 Subject: [PATCH] Provides a CMake variable to disable ccache usage --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 268676fa9..47b7a2ea8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,7 @@ if(WIN32 AND MSVC_VERSION LESS 1800) message(FATAL_ERROR "Building with Microsoft compiler needs Visual Studio 2013 or later (Express version works too)") endif() +option(ENABLE_CCACHE "Speed up incremental rebuilds via ccache" ON) option(ENABLE_JSON_LOGGING "Adds additional JSON debug logging to the response" OFF) option(BUILD_TOOLS "Build OSRM tools" OFF) option(ENABLE_ASSERTIONS OFF) @@ -421,7 +422,7 @@ COMMENT "Generating API documentation with Doxygen" VERBATIM endif() # prefix compilation with ccache by default if available and on clang or gcc -if(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") +if(ENABLE_CCACHE AND (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" OR ${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")) find_program(CCACHE_FOUND ccache) if(CCACHE_FOUND) message(STATUS "Using ccache to speed up incremental builds")