aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules/FindCCache.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/FindCCache.cmake')
-rw-r--r--cmake/modules/FindCCache.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/modules/FindCCache.cmake b/cmake/modules/FindCCache.cmake
index 0f6463b709..69e4947a2f 100644
--- a/cmake/modules/FindCCache.cmake
+++ b/cmake/modules/FindCCache.cmake
@@ -13,8 +13,8 @@ find_package_handle_standard_args(CCache REQUIRED_VARS CCACHE_PROGRAM)
if(CCACHE_FOUND)
# Supports Unix Makefiles, Ninja and Xcode
- set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
- set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE_PROGRAM}")
+ set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE STRING "" FORCE)
+ set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" CACHE STRING "" FORCE)
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")