Просмотр исходного кода

rewrite windows static analyzer build scripts to use cmake presets

Andre Weissflog 2 лет назад
Родитель
Сommit
b0fb8d8733
2 измененных файлов с 42 добавлено и 18 удалено
  1. 38 0
      tests/CMakePresets.json
  2. 4 18
      tests/analyze_win.cmd

+ 38 - 0
tests/CMakePresets.json

@@ -441,6 +441,21 @@
                 "SOKOL_BACKEND": "SOKOL_GLCORE33"
             }
         },
+        {
+            "name": "win_gl_analyze",
+            "generator": "Ninja",
+            "binaryDir": "build/win_gl_analyze",
+            "cacheVariables": {
+                "SOKOL_BACKEND": "SOKOL_GLCORE33",
+                "CMAKE_BUILD_TYPE": "Debug",
+                "USE_ANALYZER": {
+                    "type": "BOOL",
+                    "value": "ON"
+                },
+                "CMAKE_C_COMPILER": "clang",
+                "CMAKE_CXX_COMPILER": "clang++"
+            }
+        },
         {
             "name": "win_d3d11",
             "binaryDir": "build/win_d3d11",
@@ -448,6 +463,21 @@
                 "SOKOL_BACKEND": "SOKOL_D3D11"
             }
         },
+        {
+            "name": "win_d3d11_analyze",
+            "generator": "Ninja",
+            "binaryDir": "build/win_d3d11_analyze",
+            "cacheVariables": {
+                "SOKOL_BACKEND": "SOKOL_D3D11",
+                "CMAKE_BUILD_TYPE": "Debug",
+                "USE_ANALYZER": {
+                    "type": "BOOL",
+                    "value": "ON"
+                },
+                "CMAKE_C_COMPILER": "clang",
+                "CMAKE_CXX_COMPILER": "clang++"
+            }
+        },
         {
             "name": "win_uwp",
             "binaryDir": "build/win_uwp",
@@ -637,6 +667,10 @@
             "configurePreset": "win_gl",
             "configuration": "Release"
         },
+        {
+            "name": "win_gl_analyze",
+            "configurePreset": "win_gl_analyze"
+        },
         {
             "name": "win_d3d11_debug",
             "configurePreset": "win_d3d11",
@@ -647,6 +681,10 @@
             "configurePreset": "win_d3d11",
             "configuration": "Release"
         },
+        {
+            "name": "win_d3d11_analyze",
+            "configurePreset": "win_d3d11_analyze"
+        },
         {
             "name": "win_uwp_debug",
             "configurePreset": "win_uwp",

+ 4 - 18
tests/analyze_win.cmd

@@ -1,18 +1,4 @@
-if not exist ext/fips-cimgui/ (
-    git clone --depth 1 --recursive https://github.com/fips-libs/fips-cimgui ext/fips-cimgui
-)
-if not exist ext/spine-runtimes/ (
-    git clone --depth 1 --recursive https://github.com/EsotericSoftware/spine-runtimes/ ext/spine-runtimes
-)
-
-md build\win_gl_analyze
-cd build\win_gl_analyze
-cmake -GNinja -DSOKOL_BACKEND=SOKOL_GLCORE33 -DUSE_ANALYZER=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ../.. || exit /b 10
-cmake --build . || exit /b 10
-cd ..\..
-
-md build\win_d3d11_analyze
-cd build\win_d3d11_analyze
-cmake -GNinja -DSOKOL_BACKEND=SOKOL_D3D11 -DUSE_ANALYZER=ON -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ ../.. || exit /b 10
-cmake --build . || exit /b 10
-cd ..\..
+cmake --preset win_gl_analyze || exit /b 10
+cmake --build --preset win_gl_analyze || exit /b 10
+cmake --preset win_d3d11_analyze || exit /b 10
+cmake --build --preset win_d3d11_analyze || exit /b 10