aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJaeseung Ha <ipknhama@gmail.com>2017-09-17 23:27:20 +0900
committerGitHub <noreply@github.com>2017-09-17 23:27:20 +0900
commit69ed5c0a8ee8c6ccf980ba0f9be43996c7f1b684 (patch)
tree37429dd6a14132d2ca46435e9e0899ea3bdac5b8 /CMakeLists.txt
parenta92c305acb2be3f6530ea157084e5004500dd244 (diff)
parent41268d1782f6d727ccdc76311b6e3d6c17f5d4d1 (diff)
downloadcrow-69ed5c0a8ee8c6ccf980ba0f9be43996c7f1b684.tar.gz
crow-69ed5c0a8ee8c6ccf980ba0f9be43996c7f1b684.zip
Merge pull request #147 from thedrow/patch-2
Enable ccache if found for faster builds
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")