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)