use ccache if available

This commit is contained in:
Konstantinos Margaritis
2023-12-12 10:18:54 +02:00
committed by Konstantinos Margaritis
parent 4d5262eeb6
commit a041a3aa51

View File

@@ -35,6 +35,13 @@ if(${RAGEL} STREQUAL "RAGEL-NOTFOUND")
message(FATAL_ERROR "Ragel state machine compiler not found")
endif()
# Add ccache to speed builds
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif(CCACHE_FOUND)
# Build type check
if (NOT CMAKE_BUILD_TYPE)