diff --git a/CMakeLists.txt b/CMakeLists.txt index d471e3fd6..fd35d9b18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -193,6 +193,13 @@ endif() # Find Google perftools find_package(GooglePerfTools) +############################################################################### +# Support ccache, if installed +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) ############################################################################### # Find MKL