diff options
| author | manuel <manuel@mausz.at> | 2017-06-04 16:57:49 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2017-06-04 16:57:49 +0200 |
| commit | f44ecaa4f27e7538ddcad66d40e543bffa2d2d86 (patch) | |
| tree | d8de60fc7e17edeb6f0921726c038ee54b281445 /cmake/modules/FindCCache.cmake | |
| parent | ae08c8b7221bc965ac40d70e53fc8fcddb050c46 (diff) | |
| download | kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.gz kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.tar.bz2 kodi-pvr-build-f44ecaa4f27e7538ddcad66d40e543bffa2d2d86.zip | |
sync with upstream
Diffstat (limited to 'cmake/modules/FindCCache.cmake')
| -rw-r--r-- | cmake/modules/FindCCache.cmake | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/cmake/modules/FindCCache.cmake b/cmake/modules/FindCCache.cmake new file mode 100644 index 0000000..956dee2 --- /dev/null +++ b/cmake/modules/FindCCache.cmake | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | #.rst: | ||
| 2 | # FindCCache | ||
| 3 | # ---------- | ||
| 4 | # Finds ccache and sets it up as compiler wrapper. | ||
| 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 | |||
| 9 | find_program(CCACHE_PROGRAM ccache) | ||
| 10 | |||
| 11 | include(FindPackageHandleStandardArgs) | ||
| 12 | find_package_handle_standard_args(CCache REQUIRED_VARS CCACHE_PROGRAM) | ||
| 13 | |||
| 14 | if(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}") | ||
| 18 | endif() | ||
