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