Add USE_CCACHE option to CMake so that ccache can be forcibly disabled (#3661)
This commit is contained in:
parent
a522255baf
commit
6d27631764
1 changed files with 8 additions and 5 deletions
|
@ -25,11 +25,14 @@ ELSE()
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Early detect ccache
|
# Early detect ccache
|
||||||
find_program(CCACHE_PROGRAM ccache)
|
OPTION(USE_CCACHE "Cache the build results with ccache" ON)
|
||||||
if(CCACHE_PROGRAM)
|
if(USE_CCACHE)
|
||||||
# Support Unix Makefiles and Ninja
|
find_program(CCACHE_PROGRAM ccache)
|
||||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
if(CCACHE_PROGRAM)
|
||||||
MESSAGE(STATUS "Found CCache ${CCACHE_PROGRAM}")
|
# Support Unix Makefiles and Ninja
|
||||||
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
||||||
|
MESSAGE(STATUS "Found CCache ${CCACHE_PROGRAM}")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# A project name is needed for CPack
|
# A project name is needed for CPack
|
||||||
|
|
Loading…
Reference in a new issue