aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2023-02-22 11:50:25 +1000
committerRechi <Rechi@users.noreply.github.com>2023-02-22 11:50:25 +1000
commitf0b5f90b7e0f5800c32707aca8efa1c966b275f9 (patch)
tree121981ed2111586a5cb8a329a772647e6935737a
parentfe0eaae55fffbc18dd4ad96cd811711873effc39 (diff)
[cmake] allow disabling ccache
This allows switching ccache usage off without the need of a clean reconfiguration.
-rw-r--r--cmake/modules/buildtools/FindCCache.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/modules/buildtools/FindCCache.cmake b/cmake/modules/buildtools/FindCCache.cmake
index 34238dc402..04d81e2535 100644
--- a/cmake/modules/buildtools/FindCCache.cmake
+++ b/cmake/modules/buildtools/FindCCache.cmake
@@ -22,8 +22,8 @@ find_package_handle_standard_args(CCache REQUIRED_VARS CCACHE_PROGRAM
if(CCACHE_FOUND)
# Supports Unix Makefiles, Ninja and Xcode
- set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE STRING "" FORCE)
- set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE STRING "" FORCE)
+ set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" PARENT_SCOPE)
+ set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" PARENT_SCOPE)
file(WRITE "${CMAKE_BINARY_DIR}/launch-c" "#!/bin/sh\nexec \"${CCACHE_PROGRAM}\" \"${CMAKE_C_COMPILER}\" \"$@\"\n")
file(WRITE "${CMAKE_BINARY_DIR}/launch-cxx" "#!/bin/sh\nexec \"${CCACHE_PROGRAM}\" \"${CMAKE_CXX_COMPILER}\" \"$@\"\n")