Skip to content

Commit 3583493

Browse files
committed
[CMake] Use CMAKE_CXX_COMPILER_LAUNCHER for ccache.
The "canonical" way to provide a compiler launcher is this variable, added in v3.17, so it's fully usable in ROOT now.
1 parent 054aff5 commit 3583493

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ if(ccache)
217217

218218
if(EXISTS ${CCACHE_COMMAND})
219219
message(STATUS "Found ccache: ${CCACHE_COMMAND}")
220-
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_COMMAND})
220+
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_COMMAND} CACHE STRING "Path to ccache" FORCE)
221221
execute_process(COMMAND ${CCACHE_COMMAND} "-V" OUTPUT_VARIABLE CCACHE_VERSION)
222222
string(REGEX REPLACE "ccache version ([0-9\\.]+).*" "\\1" CCACHE_VERSION ${CCACHE_VERSION})
223223
else()

0 commit comments

Comments
 (0)