From: Konstantinos Margaritis Date: Tue, 12 Dec 2023 08:18:54 +0000 (+0200) Subject: use ccache if available X-Git-Tag: vectorscan/5.4.12^2~81^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F215%2Fhead;p=thirdparty%2Fvectorscan.git use ccache if available --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 30c8663e..d256e7ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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)