From 0234e8239625179e415b246cd57fc0773d456c76 Mon Sep 17 00:00:00 2001 From: Steve Gilvarry Date: Sun, 24 Jul 2016 09:26:10 +1000 Subject: [PATCH] Enable local and travis ccache --- .travis.yml | 1 + CMakeLists.txt | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/.travis.yml b/.travis.yml index 183d22e57..bb6536526 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ notifications: branches: except: - modern +cache: ccache addons: sauce_connect: username: "zoneminder" diff --git a/CMakeLists.txt b/CMakeLists.txt index 1fb59b720..8ff812106 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -742,3 +742,9 @@ configure_file( add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake) +# Configure CCache if available +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)