Skip to content

Commit 69e7f1c

Browse files
committed
Merge pull request open-source-parsers#382 from cdunn2001/ccache
Support ccache
2 parents 772f634 + d1a2b94 commit 69e7f1c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
104104
# not yet ready for -Wsign-conversion
105105
endif()
106106

107+
find_program(CCACHE_FOUND ccache)
108+
if(CCACHE_FOUND)
109+
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
110+
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
111+
endif(CCACHE_FOUND)
112+
107113
IF(JSONCPP_WITH_WARNING_AS_ERROR)
108114
UseCompilationWarningAsError()
109115
ENDIF()

0 commit comments

Comments
 (0)