mirror of
https://github.com/kurikomoe/L4D2Fix.git
synced 2026-10-10 21:03:06 +08:00
11 lines
431 B
CMake
11 lines
431 B
CMake
# From https://gist.github.com/cgmb/c48bfa77da6c825a27bf05d25001d321
|
|
|
|
option(AUTO_CCACHE "Use ccache to speed up rebuilds" ON)
|
|
find_program(CCACHE_PROGRAM ccache)
|
|
if(CCACHE_PROGRAM AND ${AUTO_CCACHE})
|
|
message(STATUS "Using ${CCACHE_PROGRAM} as compiler launcher")
|
|
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
|
# requires at least CMake 3.9 to be any use
|
|
set(CMAKE_CUDA_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
|
|
endif()
|