mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-28 15:11:55 +00:00
15 lines
527 B
CMake
15 lines
527 B
CMake
|
# Enable CCache
|
||
|
# (Set USE_CCACHE=ON to use, CCACHE_OPTIONS for options)
|
||
|
if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL Windows)
|
||
|
option(USE_CCACHE "Enable ccache support" OFF)
|
||
|
|
||
|
if(USE_CCACHE)
|
||
|
find_program(CCACHE_TOOL_PATH ccache)
|
||
|
if(CCACHE_TOOL_PATH)
|
||
|
set(CMAKE_C_COMPILER_LAUNCHER ${CCACHE_TOOL_PATH} CACHE STRING "" FORCE)
|
||
|
set(CMAKE_CXX_COMPILER_LAUNCHER ${CCACHE_TOOL_PATH} CACHE STRING "" FORCE)
|
||
|
else()
|
||
|
message(WARNING "USE_CCACHE was set but ccache is not found (set CCACHE_TOOL_PATH)")
|
||
|
endif()
|
||
|
endif()
|
||
|
endif()
|