瀏覽代碼

tests: add macos static analysis cmake presets

Andre Weissflog 2 年之前
父節點
當前提交
efa706cb34
共有 2 個文件被更改,包括 88 次插入6 次删除
  1. 84 0
      tests/CMakePresets.json
  2. 4 6
      tests/analyze_macos.sh

+ 84 - 0
tests/CMakePresets.json

@@ -24,6 +24,21 @@
                 "CMAKE_BUILD_TYPE": "Release"
             }
         },
+        {
+            "name": "macos_gl_analyze",
+            "generator": "Ninja",
+            "binaryDir": "build/macos_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": "macos_metal_debug",
             "generator": "Ninja",
@@ -42,6 +57,21 @@
                 "CMAKE_BUILD_TYPE": "Release"
             }
         },
+        {
+            "name": "macos_metal_analyze",
+            "generator": "Ninja",
+            "binaryDir": "build/macos_metal_analyze",
+            "cacheVariables": {
+                "SOKOL_BACKEND": "SOKOL_METAL",
+                "CMAKE_BUILD_TYPE": "Debug",
+                "USE_ANALYZER": {
+                    "type": "BOOL",
+                    "value": "ON"
+                },
+                "CMAKE_C_COMPILER": "clang",
+                "CMAKE_CXX_COMPILER": "clang++"
+            }
+        },
         {
             "name": "macos_arc_gl_debug",
             "generator": "Ninja",
@@ -68,6 +98,25 @@
                 "CMAKE_BUILD_TYPE": "Release"
             }
         },
+        {
+            "name": "macos_arc_gl_analyze",
+            "generator": "Ninja",
+            "binaryDir": "build/macos_arc_gl_analyze",
+            "cacheVariables": {
+                "SOKOL_BACKEND": "SOKOL_GLCORE33",
+                "USE_ARC": {
+                    "type": "BOOL",
+                    "value": "ON"
+                },
+                "CMAKE_BUILD_TYPE": "Debug",
+                "USE_ANALYZER": {
+                    "type": "BOOL",
+                    "value": "ON"
+                },
+                "CMAKE_C_COMPILER": "clang",
+                "CMAKE_CXX_COMPILER": "clang++"
+            }
+        },
         {
             "name": "macos_arc_metal_debug",
             "generator": "Ninja",
@@ -94,6 +143,25 @@
                 "CMAKE_BUILD_TYPE": "Release"
             }
         },
+        {
+            "name": "macos_arc_metal_analyze",
+            "generator": "Ninja",
+            "binaryDir": "build/macos_arc_metal_analyze",
+            "cacheVariables": {
+                "SOKOL_BACKEND": "SOKOL_METAL",
+                "USE_ARC": {
+                    "type": "BOOL",
+                    "value": "ON"
+                },
+                "CMAKE_BUILD_TYPE": "Debug",
+                "USE_ANALYZER": {
+                    "type": "BOOL",
+                    "value": "ON"
+                },
+                "CMAKE_C_COMPILER": "clang",
+                "CMAKE_CXX_COMPILER": "clang++"
+            }
+        },
         {
             "name": "ios_gl",
             "generator": "Xcode",
@@ -297,6 +365,10 @@
             "name": "macos_gl_release",
             "configurePreset": "macos_gl_release"
         },
+        {
+            "name": "macos_gl_analyze",
+            "configurePreset": "macos_gl_analyze"
+        },
         {
             "name": "macos_metal_debug",
             "configurePreset": "macos_metal_debug"
@@ -305,6 +377,10 @@
             "name": "macos_metal_release",
             "configurePreset": "macos_metal_release"
         },
+        {
+            "name": "macos_metal_analyze",
+            "configurePreset": "macos_metal_analyze"
+        },
         {
             "name": "macos_arc_gl_debug",
             "configurePreset": "macos_arc_gl_debug"
@@ -313,6 +389,10 @@
             "name": "macos_arc_gl_release",
             "configurePreset": "macos_arc_gl_release"
         },
+        {
+            "name": "macos_arc_gl_analyze",
+            "configurePreset": "macos_arc_gl_analyze"
+        },
         {
             "name": "macos_arc_metal_debug",
             "configurePreset": "macos_arc_metal_debug"
@@ -321,6 +401,10 @@
             "name": "macos_arc_metal_release",
             "configurePreset": "macos_arc_metal_release"
         },
+        {
+            "name": "macos_arc_metal_analyze",
+            "configurePreset": "macos_arc_metal_analyze"
+        },
         {
             "name": "ios_gl_debug",
             "configurePreset": "ios_gl",

+ 4 - 6
tests/analyze_macos.sh

@@ -1,10 +1,8 @@
 set -e
 source test_common.sh
-prepare
 
-analyze macos_metal_analyze SOKOL_METAL Debug
-analyze macos_gl_analyze SOKOL_METAL Debug
-
-analyze_arc macos_arc_metal_analyze SOKOL_GLCORE33 Debug
-analyze_arc macos_arc_gl_analyze SOKOL_GLCORE33 Debug
+build macos_gl_analyze macos_gl_analyze
+build macos_metal_analyze macos_metal_analyze
 
+build macos_arc_gl_analyze macos_arc_gl_analyze
+build macos_arc_metal_analyze macos_arc_metal_analyze