diff options
Diffstat (limited to 'media-gfx/freecad/files/freecad-0.19_pre20201231-0002-CMakeLists.txt-add-option-for-ccache.patch')
-rw-r--r-- | media-gfx/freecad/files/freecad-0.19_pre20201231-0002-CMakeLists.txt-add-option-for-ccache.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/media-gfx/freecad/files/freecad-0.19_pre20201231-0002-CMakeLists.txt-add-option-for-ccache.patch b/media-gfx/freecad/files/freecad-0.19_pre20201231-0002-CMakeLists.txt-add-option-for-ccache.patch new file mode 100644 index 000000000000..26bb4421077b --- /dev/null +++ b/media-gfx/freecad/files/freecad-0.19_pre20201231-0002-CMakeLists.txt-add-option-for-ccache.patch @@ -0,0 +1,33 @@ +From bce02c4804d14ae2257ad5f5e7fae4e2baa74503 Mon Sep 17 00:00:00 2001 +From: Bernd Waibel <waebbl@gmail.com> +Date: Thu, 31 Dec 2020 13:31:47 +0100 +Subject: [PATCH 2/2] CMakeLists.txt: add option for ccache + +Signed-off-by: Bernd Waibel <waebbl@gmail.com> +--- + CMakeLists.txt | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index f4dabf7..17b9fad 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -8,9 +8,12 @@ if (POLICY CMP0072) + cmake_policy(SET CMP0072 OLD) + endif(POLICY CMP0072) + +-find_program(CCACHE_PROGRAM ccache) #This check should occur before project() +-if(CCACHE_PROGRAM) +- set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") ++option(FREECAD_USE_CCACHE "Use ccache to build FreeCAD" OFF) ++if(FREECAD_USE_CCACHE) ++ find_program(CCACHE_PROGRAM ccache) #This check should occur before project() ++ if(CCACHE_PROGRAM) ++ set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") ++ endif() + endif() + + project(FreeCAD) +-- +2.30.0 + |