summaryrefslogtreecommitdiff
blob: 16deeaf0bb73af318322781338ef363abdeae2e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
From 494501bbc88d30d9f1ceb6fb3fbd428eeb58ddee Mon Sep 17 00:00:00 2001
From: James Le Cuirot <chewi@gentoo.org>
Date: Wed, 13 Mar 2019 22:18:45 +0000
Subject: [PATCH] Add USE_CCACHE option to CMake so that ccache can be forcibly
 disabled

---
 CMakeLists.txt | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index cc39e77..59eec3d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,12 +25,15 @@ ELSE()
 ENDIF()
 
 # Early detect ccache
+OPTION(USE_CCACHE "Cache the build results with ccache" ON)
+if(USE_CCACHE)
 find_program(CCACHE_PROGRAM ccache)
 if(CCACHE_PROGRAM)
     # Support Unix Makefiles and Ninja
     set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
     MESSAGE(STATUS "Found CCache ${CCACHE_PROGRAM}")
 endif()
+endif()
 
 # A project name is needed for CPack
 # Version can be overriden by git tags, see cmake/getversion.cmake
-- 
2.20.1