Skip to content

Commit ead1dc8

Browse files
authored
Use CMAKE_LANG_COMPILER_LAUNCHER to launch ccache. (#2173)
1 parent 631ba9f commit ead1dc8

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,9 @@ target_architecture(PCAPP_TARGET_ARCHITECTURE)
3434
find_program(CCACHE_PROGRAM ccache)
3535
if(CCACHE_PROGRAM)
3636
message(STATUS "Ccache found!")
37-
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
38-
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE_PROGRAM}")
37+
message(VERBOSE "Ccache program: ${CCACHE_PROGRAM}")
38+
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
39+
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
3940
else()
4041
message(STATUS "Ccache not found!")
4142
endif()

0 commit comments

Comments
 (0)