aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f7f2d99..2f0eb3f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,15 @@ if(OPENSSL_FOUND)
include_directories(${OPENSSL_INCLUDE_DIR})
endif()
+find_program(CCACHE_FOUND ccache)
+if(CCACHE_FOUND)
+ message("Found ccache ${CCACHE_FOUND}")
+ message("Using ccache to speed up compilation")
+ set(ENV{CCACHE_CPP2} "yes")
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
+ set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
+endif(CCACHE_FOUND)
+
if (NOT CMAKE_BUILD_TYPE)
message(STATUS "No build type selected, default to Release")
set(CMAKE_BUILD_TYPE "Release")