Преглед на файлове

Merge pull request #3036 from Alexander-Wilms/disable-ccache-by-default

Set ENABLE_CCACHE to OFF by default
Nordsoft91 преди 2 години
родител
ревизия
6c151e283a
променени са 3 файла, в които са добавени 20 реда и са изтрити 3 реда
  1. 1 1
      .github/workflows/github.yml
  2. 1 1
      CMakeLists.txt
  3. 18 1
      CMakePresets.json

+ 1 - 1
.github/workflows/github.yml

@@ -111,7 +111,7 @@ jobs:
             test: 0
             pack: 1
             extension: exe
-            preset: windows-msvc-release
+            preset: windows-msvc-release-ccache
           - platform: mingw-ubuntu
             os: ubuntu-22.04
             test: 0

+ 1 - 1
CMakeLists.txt

@@ -82,7 +82,7 @@ endif()
 # On Linux, use -DCMAKE_CXX_COMPILER_LAUNCHER=ccache instead.
 # The XCode and MSVC builds each require some more configuration, which is enabled by the following option:
 if(MSVC OR (CMAKE_GENERATOR STREQUAL "Xcode"))
-  option(ENABLE_CCACHE "Speed up recompilation by caching previous compilations" ON)
+  option(ENABLE_CCACHE "Speed up recompilation by caching previous compilations" OFF)
 endif()
 
 if(ENABLE_CCACHE AND (CMAKE_GENERATOR STREQUAL "Xcode"))

+ 18 - 1
CMakePresets.json

@@ -123,6 +123,17 @@
                 "CMAKE_TOOLCHAIN_FILE": "${sourceDir}/vcpkg/scripts/buildsystems/vcpkg.cmake",
                 "CMAKE_POLICY_DEFAULT_CMP0091": "NEW",
                 "FORCE_BUNDLED_MINIZIP": "ON"
+
+            }
+        },
+        {
+            "name": "windows-msvc-release-ccache",
+            "displayName": "Windows x64 RelWithDebInfo with ccache",
+            "description": "VCMI RelWithDebInfo build with ccache",
+            "inherits": "windows-msvc-release",
+            "cacheVariables": {
+                "ENABLE_CCACHE": "ON"
+
             }
         },
         {
@@ -228,7 +239,8 @@
             "description": "VCMI iOS release using Conan and ccache",
             "inherits": "ios-release-conan",
             "cacheVariables": {
-                "ENABLE_PCH" : "OFF"
+                "ENABLE_PCH" : "OFF",
+                "ENABLE_CCACHE": "ON"
             }
         },
         {
@@ -318,6 +330,11 @@
             "inherits": "default-release",
             "configuration": "Release"
         },
+        {
+            "name": "windows-msvc-release-ccache",
+            "configurePreset": "windows-msvc-release-ccache",
+            "inherits": "windows-msvc-release"
+        },
         {
             "name": "windows-msvc-relwithdebinfo",
             "configurePreset": "windows-msvc-release",