summaryrefslogtreecommitdiffstats
path: root/project/cmake/modules/FindCCache.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2016-11-24 21:27:41 +0100
committermanuel <manuel@mausz.at>2016-11-24 21:27:41 +0100
commit8cdf8dec703d882b46ca50a769fabb95ffc48e2c (patch)
treef7fe8233508f79d3dc94f8f445ce6342e7dfbdbb /project/cmake/modules/FindCCache.cmake
parent5823b05feb29a59510c32a9c28ca18b50b9b6399 (diff)
downloadkodi-pvr-build-8cdf8dec703d882b46ca50a769fabb95ffc48e2c.tar.gz
kodi-pvr-build-8cdf8dec703d882b46ca50a769fabb95ffc48e2c.tar.bz2
kodi-pvr-build-8cdf8dec703d882b46ca50a769fabb95ffc48e2c.zip
sync with upstream
Diffstat (limited to 'project/cmake/modules/FindCCache.cmake')
-rw-r--r--project/cmake/modules/FindCCache.cmake22
1 files changed, 17 insertions, 5 deletions
diff --git a/project/cmake/modules/FindCCache.cmake b/project/cmake/modules/FindCCache.cmake
index 4ad7d07..a7fd29f 100644
--- a/project/cmake/modules/FindCCache.cmake
+++ b/project/cmake/modules/FindCCache.cmake
@@ -1,6 +1,18 @@
1find_program(CCACHE_FOUND ccache) 1#.rst:
2if(CCACHE_FOUND) 2# FindCCache
3 set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) 3# ----------
4 set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) 4# Finds ccache and sets it up as compiler wrapper.
5endif(CCACHE_FOUND) 5# This should ideally be called before the call to project().
6#
7# See: https://crascit.com/2016/04/09/using-ccache-with-cmake/
8
9find_program(CCACHE_PROGRAM ccache)
6 10
11include(FindPackageHandleStandardArgs)
12find_package_handle_standard_args(CCACHE REQUIRED_VARS CCACHE_PROGRAM)
13
14if(CCACHE_FOUND)
15 # Supports Unix Makefiles and Ninja
16 set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
17 set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK "${CCACHE_PROGRAM}")
18endif()