summaryrefslogtreecommitdiffstats
path: root/recipes-devtools/spirv-llvm-translator/spirv-llvm-translator/0001-cmake-allow-to-enable-disable-ccache.patch
blob: 68cdda4fbb70fa1f7545a86d12f5498a3e318876 (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
From 13b679eb76e6877b40fd41b91e71cb172bcf7b26 Mon Sep 17 00:00:00 2001
From: Naveen Saini <naveen.kumar.saini@intel.com>
Date: Thu, 4 Mar 2021 11:23:20 +0800
Subject: [PATCH] cmake: allow to enable/disable ccache

By default ccache is enabled.

Upstream-Status: Submitted [https://github.com/KhronosGroup/SPIRV-LLVM-Translator/pull/930]

Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
---
 CMakeLists.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0ddb55c..c7d0498 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,8 +50,9 @@ if(LLVM_SPIRV_BUILD_EXTERNAL)
 
   message(STATUS "Found LLVM: ${LLVM_VERSION}")
 
+  option(CCACHE_ALLOWED "allow use of ccache" TRUE)
   find_program(CCACHE_EXE_FOUND ccache)
-  if(CCACHE_EXE_FOUND)
+  if(CCACHE_EXE_FOUND AND CCACHE_ALLOWED)
     message(STATUS "Found ccache: ${CCACHE_EXE_FOUND}")
     set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
     set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
-- 
2.17.1