]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
use ccache if available 215/head
authorKonstantinos Margaritis <markos@freevec.org>
Tue, 12 Dec 2023 08:18:54 +0000 (10:18 +0200)
committerKonstantinos Margaritis <konma@vectorcamp.gr>
Thu, 21 Dec 2023 12:59:56 +0000 (12:59 +0000)
CMakeLists.txt

index 30c8663e7b5a5f213293a1f5b0eb1483592591c8..d256e7ed95f8529f2a70dc669b70787d075c325d 100644 (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)