Merge pull request #1669 from AlvinMooreSr/cmake-ccache
Enable ccache by Environmental Variable
This commit is contained in:
commit
3fcf491b00
|
@ -45,7 +45,13 @@ else()
|
|||
add_definitions(-DUSE_UCONTEXT)
|
||||
endif()
|
||||
|
||||
if(USE_CCACHE)
|
||||
if ((NOT USE_CCACHE) AND (NOT "$ENV{USE_CCACHE}" STREQUAL ""))
|
||||
string(TOUPPER "$ENV{USE_CCACHE}" USE_CCACHEENV)
|
||||
if (("${USE_CCACHEENV}" STREQUAL "ON") OR ("${USE_CCACHEENV}" STREQUAL "1") OR ("${USE_CCACHEENV}" STREQUAL "YES"))
|
||||
set(USE_CCACHE ON)
|
||||
endif()
|
||||
endif()
|
||||
if (USE_CCACHE)
|
||||
FIND_PROGRAM(CCACHE_FOUND "ccache")
|
||||
if(CCACHE_FOUND)
|
||||
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
|
||||
|
|
Loading…
Reference in New Issue