Add ccache to the clang builds

Ccache increases compilation speeds dramatically
Add this to the clang toolchain
This commit is contained in:
Matthew 2020-02-10 11:00:51 +11:00
parent 5a2251a56d
commit b043dbde84

View file

@ -46,3 +46,12 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
mark_as_advanced(FORCE CMAKE_TOOLCHAIN_FILE)
find_program(CCACHE ccache)
if(NOT ("${CCACHE}" STREQUAL CCACHE-NOTFOUND))
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE})
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE})
endif()
mark_as_advanced(CCACHE)