diff options
author | Omer Katz <omer.drow@gmail.com> | 2016-07-29 10:35:53 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-29 10:35:53 +0300 |
commit | 810e7f45fe7566f377b23d2a193c9ef3f718423e (patch) | |
tree | 2e2cad599369819ed7055031aa86fb0158f35bc0 | |
parent | da4bb3aeab4112071b25e53142cb286b10b91b23 (diff) | |
download | crow-810e7f45fe7566f377b23d2a193c9ef3f718423e.tar.gz crow-810e7f45fe7566f377b23d2a193c9ef3f718423e.zip |
Enable ccache if found for faster builds.
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 07a058b..4e78d9e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,15 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/") find_package(Tcmalloc) find_package(Threads) +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") |