[utilities/sweeper] /: Remove warning (found by cmake --warn-uninitialized -Werror=dev )
Laurent Montel <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 3c2c83e20bacfd30dc4a034ce1f4720072124f4e by Laurent Montel.
Committed on 23/07/2026 at 11:51.
Pushed by mlaurent into branch 'master'.
Remove warning (found by cmake --warn-uninitialized -Werror=dev )
M +1 -1 CMakeLists.txt
M +81 -50 CMakePresets.json
https://invent.kde.org/utilities/sweeper/-/commit/3c2c83e20bacfd30dc4a034ce1f4720072124f4e
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 526a9ef..f0ba2a3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,7 @@ set(QT_REQUIRED_VERSION "6.7.0")
set(KF_MIN_VERSION "6.3.0")
find_package(ECM ${KF_MIN_VERSION} NO_MODULE REQUIRED)
-set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${ECM_MODULE_PATH})
+set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
include(KDEInstallDirs)
include(KDECMakeSettings)
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
+ }
+ }
+ ]
}