CMake: Add option ENABLE_CCACHE

This commit is contained in:
Dennis Klein 2019-11-15 14:43:50 +01:00
parent 9d30ff25c2
commit 71325828f6
No known key found for this signature in database
GPG Key ID: 08E62D23FA0ECBBC

View File

@ -194,6 +194,13 @@ macro(set_fairmq_defaults)
endif() endif()
list(APPEND PROJECT_STATIC_ANALYSERS "${analyser}") list(APPEND PROJECT_STATIC_ANALYSERS "${analyser}")
endif() endif()
if(CMAKE_GENERATOR STREQUAL Ninja AND ENABLE_CCACHE)
find_program(CCACHE ccache)
if(CCACHE)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
endif()
endif()
endmacro() endmacro()
function(join VALUES GLUE OUTPUT) function(join VALUES GLUE OUTPUT)