From cfc12d05433b1077ff8fcb46316615b7f0474d16 Mon Sep 17 00:00:00 2001 From: PatTheMav Date: Tue, 11 Jun 2024 16:34:36 +0200 Subject: [PATCH] cmake: Disable CCache for local builds and enable by default for CI --- CMakePresets.json | 12 ++++++------ cmake/common/ccache.cmake | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 70fc423cc..be85184b7 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -52,7 +52,8 @@ "inherits": ["macos"], "warnings": {"dev": true, "deprecated": true}, "cacheVariables": { - "CMAKE_COMPILE_WARNING_AS_ERROR": true + "CMAKE_COMPILE_WARNING_AS_ERROR": true, + "ENABLE_CCACHE": true } }, { @@ -83,7 +84,8 @@ "cacheVariables": { "CMAKE_BUILD_TYPE": "RelWithDebInfo", "CMAKE_COMPILE_WARNING_AS_ERROR": true, - "CMAKE_COLOR_DIAGNOSTICS": true + "CMAKE_COLOR_DIAGNOSTICS": true, + "ENABLE_CCACHE": true } }, { @@ -102,8 +104,7 @@ "cacheVariables": { "GPU_PRIORITY_VAL": {"type": "STRING", "value": "$penv{GPU_PRIORITY_VAL}"}, "VIRTUALCAM_GUID": {"type": "STRING", "value": "A3FCE0F5-3493-419F-958A-ABA1250EC20B"}, - "ENABLE_BROWSER": true, - "ENABLE_CCACHE": false + "ENABLE_BROWSER": true } }, { @@ -113,8 +114,7 @@ "inherits": ["windows-x64"], "warnings": {"dev": true, "deprecated": true}, "cacheVariables": { - "CMAKE_COMPILE_WARNING_AS_ERROR": true, - "ENABLE_CCACHE": false + "CMAKE_COMPILE_WARNING_AS_ERROR": true } } ], diff --git a/cmake/common/ccache.cmake b/cmake/common/ccache.cmake index 5083d7b81..577279e0c 100644 --- a/cmake/common/ccache.cmake +++ b/cmake/common/ccache.cmake @@ -11,7 +11,7 @@ endif() if(CCACHE_PROGRAM) message(DEBUG "Trying to find ccache on build host - done") message(DEBUG "Ccache found as ${CCACHE_PROGRAM}") - option(ENABLE_CCACHE "Enable compiler acceleration with ccache" ON) + option(ENABLE_CCACHE "Enable compiler acceleration with ccache" OFF) if(ENABLE_CCACHE) set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")