From 14f3b6c928c9e2843a34c63bd5abbac5eee35d46 Mon Sep 17 00:00:00 2001 From: g-coder Date: Thu, 26 Nov 2015 15:12:23 +0530 Subject: [PATCH 1/2] Added ccache support for faster compilation ccache is a compiler cache. It speeds up recompilation by caching previous compilations and detecting when the same compilation is being done again. It provides support for C/C++ languages. It makes compilation fast if it is available on the machine. https://ccache.samba.org/ --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fe1dadb..27c146a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -137,6 +137,12 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake" "${CMAKE_CURRENT_BIN file(COPY doc/taglib.png DESTINATION doc) add_custom_target(docs doxygen) +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) + # uninstall target configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" From e1bcb101f03e235cb6f829e05bc36d0c37ad6dd2 Mon Sep 17 00:00:00 2001 From: g-coder Date: Thu, 26 Nov 2015 15:51:42 +0530 Subject: [PATCH 2/2] Update CMakeLists.txt --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 27c146a9..1b99fb59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,8 +139,8 @@ add_custom_target(docs doxygen) find_program(CCACHE_FOUND ccache) if(CCACHE_FOUND) - set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) - set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) endif(CCACHE_FOUND) # uninstall target