Merge pull request #215 from VectorCamp/feature/use-ccache

use ccache if available
This commit is contained in:
Konstantinos Margaritis 2023-12-22 01:18:22 +02:00 committed by GitHub
commit 17fb9f41f6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)