2022-12-06 21:57:20 +00:00
|
|
|
#
|
|
|
|
# ccache setup
|
|
|
|
#
|
|
|
|
|
2022-12-06 21:57:10 +00:00
|
|
|
list(APPEND COMPILERS
|
|
|
|
"CMAKE_C_COMPILER"
|
|
|
|
"CMAKE_CXX_COMPILER"
|
|
|
|
)
|
2022-12-06 21:57:20 +00:00
|
|
|
find_program(CCACHE_PROGRAM ccache)
|
|
|
|
if(CCACHE_PROGRAM)
|
2022-12-06 21:57:10 +00:00
|
|
|
foreach(compiler ${COMPILERS})
|
|
|
|
get_filename_component(compiler_path "${${compiler}}" REALPATH)
|
|
|
|
get_filename_component(compiler_name "${compiler_path}" NAME)
|
|
|
|
if (NOT ${compiler_name} MATCHES "ccache")
|
|
|
|
set("${compiler}_LAUNCHER" "${CCACHE_PROGRAM}" CACHE FILEPATH "Path to a compiler launcher program, e.g. ccache")
|
|
|
|
endif()
|
|
|
|
endforeach()
|
|
|
|
endif()
|