Browse Source

cmake: Disable CCache for local builds and enable by default for CI

PatTheMav 1 year ago
parent
commit
cfc12d0543
2 changed files with 7 additions and 7 deletions
  1. 6 6
      CMakePresets.json
  2. 1 1
      cmake/common/ccache.cmake

+ 6 - 6
CMakePresets.json

@@ -52,7 +52,8 @@
       "inherits": ["macos"],
       "inherits": ["macos"],
       "warnings": {"dev": true, "deprecated": true},
       "warnings": {"dev": true, "deprecated": true},
       "cacheVariables": {
       "cacheVariables": {
-        "CMAKE_COMPILE_WARNING_AS_ERROR": true
+        "CMAKE_COMPILE_WARNING_AS_ERROR": true,
+        "ENABLE_CCACHE": true
       }
       }
     },
     },
     {
     {
@@ -83,7 +84,8 @@
       "cacheVariables": {
       "cacheVariables": {
         "CMAKE_BUILD_TYPE": "RelWithDebInfo",
         "CMAKE_BUILD_TYPE": "RelWithDebInfo",
         "CMAKE_COMPILE_WARNING_AS_ERROR": true,
         "CMAKE_COMPILE_WARNING_AS_ERROR": true,
-        "CMAKE_COLOR_DIAGNOSTICS": true
+        "CMAKE_COLOR_DIAGNOSTICS": true,
+        "ENABLE_CCACHE": true
       }
       }
     },
     },
     {
     {
@@ -102,8 +104,7 @@
       "cacheVariables": {
       "cacheVariables": {
         "GPU_PRIORITY_VAL": {"type": "STRING", "value": "$penv{GPU_PRIORITY_VAL}"},
         "GPU_PRIORITY_VAL": {"type": "STRING", "value": "$penv{GPU_PRIORITY_VAL}"},
         "VIRTUALCAM_GUID": {"type": "STRING", "value": "A3FCE0F5-3493-419F-958A-ABA1250EC20B"},
         "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"],
       "inherits": ["windows-x64"],
       "warnings": {"dev": true, "deprecated": true},
       "warnings": {"dev": true, "deprecated": true},
       "cacheVariables": {
       "cacheVariables": {
-        "CMAKE_COMPILE_WARNING_AS_ERROR": true,
-        "ENABLE_CCACHE": false
+        "CMAKE_COMPILE_WARNING_AS_ERROR": true
       }
       }
     }
     }
   ],
   ],

+ 1 - 1
cmake/common/ccache.cmake

@@ -11,7 +11,7 @@ endif()
 if(CCACHE_PROGRAM)
 if(CCACHE_PROGRAM)
   message(DEBUG "Trying to find ccache on build host - done")
   message(DEBUG "Trying to find ccache on build host - done")
   message(DEBUG "Ccache found as ${CCACHE_PROGRAM}")
   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)
   if(ENABLE_CCACHE)
     set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
     set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")