aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Weissflog <floooh@gmail.com>2022-11-20 16:32:17 +0100
committerAndre Weissflog <floooh@gmail.com>2022-11-20 16:32:17 +0100
commitb0fb8d87337a74b43a35bb356dd0238b1b0e2a5a (patch)
tree15147fa5d886e2a9a96de27933e201c0613cfdf3
parent48fb60f8f76372c733a58a9e6f843d4a82902da2 (diff)
rewrite windows static analyzer build scripts to use cmake presets
-rw-r--r--tests/CMakePresets.json38
-rw-r--r--tests/analyze_win.cmd22
2 files changed, 42 insertions, 18 deletions
diff --git a/tests/CMakePresets.json b/tests/CMakePresets.json
index 6ae9e88f..e0f04513 100644
--- a/tests/CMakePresets.json
+++ b/tests/CMakePresets.json
@@ -442,6 +442,21 @@
}
},
{
+ "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",
"cacheVariables": {
@@ -449,6 +464,21 @@
}
},
{
+ "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",
"cacheVariables": {
@@ -638,6 +668,10 @@
"configuration": "Release"
},
{
+ "name": "win_gl_analyze",
+ "configurePreset": "win_gl_analyze"
+ },
+ {
"name": "win_d3d11_debug",
"configurePreset": "win_d3d11",
"configuration": "Debug"
@@ -648,6 +682,10 @@
"configuration": "Release"
},
{
+ "name": "win_d3d11_analyze",
+ "configurePreset": "win_d3d11_analyze"
+ },
+ {
"name": "win_uwp_debug",
"configurePreset": "win_uwp",
"configuration": "Debug"
diff --git a/tests/analyze_win.cmd b/tests/analyze_win.cmd
index a0465345..39aa7981 100644
--- a/tests/analyze_win.cmd
+++ b/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