CMake: modernize to use CMAKE_<LANG>_COMPILER_LAUNCHER for ccache.
This commit is contained in:
committed by
Chris Hennes
parent
4c4fe8cc75
commit
027581e367
@@ -21,8 +21,9 @@ option(FREECAD_USE_CCACHE "Auto detect and use ccache during compilation" ON)
|
||||
if(FREECAD_USE_CCACHE)
|
||||
find_program(CCACHE_PROGRAM ccache) #This check should occur before project()
|
||||
if(CCACHE_PROGRAM)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||
message(NOTICE "-- Using ccache found at: " ${CCACHE_PROGRAM})
|
||||
message(STATUS "Using ccache found at: " ${CCACHE_PROGRAM})
|
||||
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
||||
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user