diff options
author | Jaeseung Ha <ipknhama@gmail.com> | 2017-09-17 23:27:20 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-17 23:27:20 +0900 |
commit | 69ed5c0a8ee8c6ccf980ba0f9be43996c7f1b684 (patch) | |
tree | 37429dd6a14132d2ca46435e9e0899ea3bdac5b8 | |
parent | a92c305acb2be3f6530ea157084e5004500dd244 (diff) | |
parent | 41268d1782f6d727ccdc76311b6e3d6c17f5d4d1 (diff) | |
download | crow-69ed5c0a8ee8c6ccf980ba0f9be43996c7f1b684.tar.gz crow-69ed5c0a8ee8c6ccf980ba0f9be43996c7f1b684.zip |
Merge pull request #147 from thedrow/patch-2
Enable ccache if found for faster builds
-rw-r--r-- | .travis.yml | 1 | ||||
-rw-r--r-- | CMakeLists.txt | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml index 5957c58..b41bf48 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,7 @@ language: cpp sudo: false +cache: ccache notifications: irc: "chat.freenode.net##crow" 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") |