Support ccache

http://stackoverflow.com/a/24305849/263998
This commit is contained in:
Christopher Dunn 2015-10-19 12:10:58 -05:00
parent 772f634548
commit d1a2b94d5b

View File

@ -104,6 +104,12 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# not yet ready for -Wsign-conversion
endif()
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)
IF(JSONCPP_WITH_WARNING_AS_ERROR)
UseCompilationWarningAsError()
ENDIF()