[utilities/ktimer] /: Add check-cmake support

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 62446d83c29b4b0b71a9ed1545ea7933c21a65e3 by Laurent Montel.
Committed on 22/07/2026 at 05:48.
Pushed by mlaurent into branch 'master'.

Add check-cmake support

M  +81   -50   CMakePresets.json

https://invent.kde.org/utilities/ktimer/-/commit/62446d83c29b4b0b71a9ed1545ea7933c21a65e3

diff --git a/CMakePresets.json b/CMakePresets.json
index cd21247..32a5987 100644
--- a/CMakePresets.json
+++ b/CMakePresets.json
@@ -1,5 +1,6 @@
 {
-    "version": 3,
+    "$schema": "https://cmake.org/cmake/help/latest/_downloads/3e2d73bff478d88a7de0de736ba5e361/schema.json",
+    "version": 8,
     "configurePresets": [
         {
             "name": "base",
@@ -9,21 +10,32 @@
             "installDir": "$env{KF6}",
             "hidden": true,
             "cacheVariables": {
-                "BUILD_QCH": "ON"
+                "WARNINGS_AS_ERRORS": "ON"
             }
         },
         {
             "name": "dev-mold",
             "displayName": "Build as debug + using mold linker",
             "cacheVariables": {
-                "CMAKE_BUILD_TYPE": "Debug",
-                "CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
                 "CMAKE_SHARED_LINKER_FLAGS": "-fuse-ld=mold"
             },
             "inherits": [
-                "base"
+                "dev"
             ]
         },
+        {
+            "name": "check-cmake",
+            "displayName": "Configure with strict warning",
+            "inherits": [
+                "dev-mold"
+            ],
+            "errors": {
+                "dev": true
+            },
+            "warnings": {
+                "uninitialized": true
+            }
+        },
         {
             "name": "dev",
             "displayName": "Build as debug",
@@ -40,7 +52,7 @@
             "displayName": "Build with Asan support.",
             "cacheVariables": {
                 "CMAKE_BUILD_TYPE": "Debug",
-                "ECM_ENABLE_SANITIZERS" : "'address;undefined'"
+                "ECM_ENABLE_SANITIZERS": "'address;undefined'"
             },
             "inherits": [
                 "base"
@@ -49,27 +61,22 @@
         {
             "name": "dev-clang",
             "displayName": "dev-clang",
-            "cacheVariables": {
-                "CMAKE_BUILD_TYPE": "Debug",
-                "CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
-            },
             "environment": {
                 "CXX": "clang++",
                 "CCACHE_DISABLE": "ON"
             },
             "inherits": [
-                "base"
+                "dev"
             ]
         },
         {
             "name": "unity",
             "displayName": "Build with CMake unity support.",
             "cacheVariables": {
-                "CMAKE_BUILD_TYPE": "Debug",
                 "USE_UNITY_CMAKE_SUPPORT": "ON"
             },
             "inherits": [
-                "base"
+                "dev"
             ]
         },
         {
@@ -120,15 +127,19 @@
             ]
         },
         {
-            "name": "pch",
-            "displayName": "pch",
+            "name": "ftime-trace",
+            "displayName": "ftime-trace",
             "cacheVariables": {
-                "CMAKE_BUILD_TYPE": "Debug",
-                "USE_PRECOMPILED_HEADERS": "ON",
-                "BUILD_COVERAGE": "ON"
+                "CMAKE_C_FLAGS_INIT": "-ftime-trace",
+                "CMAKE_CXX_FLAGS_INIT": "-ftime-trace"
+            },
+            "environment": {
+                "CC": "/usr/bin/clang",
+                "CXX": "/usr/bin/clang++",
+                "CCACHE_DISABLE": "ON"
             },
             "inherits": [
-                "base"
+                "dev"
             ]
         }
     ],
@@ -137,6 +148,10 @@
             "name": "dev",
             "configurePreset": "dev"
         },
+        {
+            "name": "ftime-trace",
+            "configurePreset": "ftime-trace"
+        },
         {
             "name": "dev-mold",
             "configurePreset": "dev-mold"
@@ -145,10 +160,6 @@
             "name": "dev-clang",
             "configurePreset": "dev-clang"
         },
-        {
-            "name": "pch",
-            "configurePreset": "pch"
-        },
         {
             "name": "release",
             "configurePreset": "release"
@@ -169,35 +180,55 @@
             "name": "clazy",
             "configurePreset": "clazy",
             "environment": {
[suppressed due to size limit]
-                "CCACHE_DISABLE" : "ON"
[suppressed due to size limit]
+                "CCACHE_DISABLE": "ON"
             }
         }
     ],
     "testPresets": [
-    {
-      "name": "dev",
-      "configurePreset": "dev",
-      "output": {"outputOnFailure": true},
-      "execution": {"noTestsAction": "error", "stopOnFailure": false}
-    },
-    {
-      "name": "asan",
-      "configurePreset": "asan",
-      "output": {"outputOnFailure": true},
-      "execution": {"noTestsAction": "error", "stopOnFailure": true}
-    },
-    {
-      "name": "unity",
-      "configurePreset": "unity",
-      "output": {"outputOnFailure": true},
-      "execution": {"noTestsAction": "error", "stopOnFailure": true}
-    },
-    {
-      "name": "coverage",
-      "configurePreset": "coverage",
-      "output": {"outputOnFailure": true},
-      "execution": {"noTestsAction": "error", "stopOnFailure": true}
-    }
-  ]
+        {
+            "name": "dev",
+            "configurePreset": "dev",
+            "output": {
+                "outputOnFailure": true
+            },
+            "execution": {
+                "noTestsAction": "error",
+                "stopOnFailure": false
+            }
+        },
+        {
+            "name": "asan",
+            "configurePreset": "asan",
+            "output": {
+                "outputOnFailure": true
+            },
+            "execution": {
+                "noTestsAction": "error",
+                "stopOnFailure": true
+            }
+        },
+        {
+            "name": "unity",
+            "configurePreset": "unity",
+            "output": {
+                "outputOnFailure": true
+            },
+            "execution": {
+                "noTestsAction": "error",
+                "stopOnFailure": true
+            }
+        },
+        {
+            "name": "coverage",
+            "configurePreset": "coverage",
+            "output": {
+                "outputOnFailure": true
+            },
+            "execution": {
+                "noTestsAction": "error",
+                "stopOnFailure": true
+            }
+        }
+    ]
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.