Skip to content

Commit ad70693

Browse files
markosKonstantinos Margaritis
authored andcommitted
use ccache if available
1 parent 3113d1c commit ad70693

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ if(${RAGEL} STREQUAL "RAGEL-NOTFOUND")
3535
message(FATAL_ERROR "Ragel state machine compiler not found")
3636
endif()
3737

38+
# Add ccache to speed builds
39+
find_program(CCACHE_FOUND ccache)
40+
if(CCACHE_FOUND)
41+
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
42+
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
43+
endif(CCACHE_FOUND)
44+
3845
# Build type check
3946

4047
if (NOT CMAKE_BUILD_TYPE)

0 commit comments

Comments
 (0)