[graphics/libksane] /: Remove warning (found by cmake --warn-uninitialized -Werror=dev )
Laurent Montel <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit b0601e04d78c26abf9c3e24d84c9827bab3d9001 by Laurent Montel.
Committed on 28/07/2026 at 18:29.
Pushed by mlaurent into branch 'master'.
Remove warning (found by cmake --warn-uninitialized -Werror=dev )
M +146 -79 CMakePresets.json
M +1 -1 autotests/CMakeLists.txt
https://invent.kde.org/graphics/libksane/-/commit/b0601e04d78c26abf9c3e24d84c9827bab3d9001
diff --git a/CMakePresets.json b/CMakePresets.json
index 1e6f1fa..32a5987 100644
--- a/CMakePresets.json
+++ b/CMakePresets.json
@@ -1,106 +1,120 @@
{
- "version": 3,
+ "$schema": "https://cmake.org/cmake/help/latest/_downloads/3e2d73bff478d88a7de0de736ba5e361/schema.json",
+ "version": 8,
"configurePresets": [
{
- "name": "dev",
- "displayName": "Build as debug",
+ "name": "base",
+ "displayName": "base preset",
"generator": "Ninja",
- "binaryDir": "${sourceDir}/build",
+ "binaryDir": "${sourceDir}/build-${presetName}",
+ "installDir": "$env{KF6}",
+ "hidden": true,
"cacheVariables": {
- "CMAKE_BUILD_TYPE": "Debug",
- "CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
- },
- "installDir": "$env{KF5}"
+ "WARNINGS_AS_ERRORS": "ON"
+ }
},
{
- "name": "dev-disable-deprecated",
- "displayName": "Build as without deprecated methods",
- "generator": "Ninja",
- "binaryDir": "${sourceDir}/build-disable-deprecated",
+ "name": "dev-mold",
+ "displayName": "Build as debug + using mold linker",
"cacheVariables": {
- "CMAKE_BUILD_TYPE": "Debug",
- "CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
- "CMAKE_CXX_FLAGS_INIT": "-DQT_DISABLE_DEPRECATED_BEFORE=0x060000 -DKF_DISABLE_DEPRECATED_BEFORE_AND_AT=0x060000"
+ "CMAKE_SHARED_LINKER_FLAGS": "-fuse-ld=mold"
},
- "installDir": "$env{KF5}"
+ "inherits": [
+ "dev"
+ ]
},
{
- "name": "asan",
- "displayName": "Build with Asan support.",
- "generator": "Ninja",
- "binaryDir": "${sourceDir}/build-asan",
+ "name": "check-cmake",
+ "displayName": "Configure with strict warning",
+ "inherits": [
+ "dev-mold"
+ ],
+ "errors": {
+ "dev": true
+ },
+ "warnings": {
+ "uninitialized": true
+ }
+ },
+ {
+ "name": "dev",
+ "displayName": "Build as debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
- "ECM_ENABLE_SANITIZERS" : "'address;undefined'",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
},
- "installDir": "$env{KF5}"
+ "inherits": [
+ "base"
+ ]
},
{
- "name": "pch",
- "displayName": "Build with PCH support.",
- "generator": "Ninja",
- "binaryDir": "${sourceDir}/build-pch",
+ "name": "asan",
+ "displayName": "Build with Asan support.",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
- "COMPILE_WITH_CMAKE_PCH_SUPPORT": "ON",
- "CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
+ "ECM_ENABLE_SANITIZERS": "'address;undefined'"
},
- "installDir": "$env{KF5}"
+ "inherits": [
+ "base"
+ ]
},
{
"name": "dev-clang",
"displayName": "dev-clang",
- "generator": "Ninja",
- "binaryDir": "${sourceDir}/build-clang",
- "cacheVariables": {
- "CMAKE_BUILD_TYPE": "Debug",
- "CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
- },
"environment": {
"CXX": "clang++",
"CCACHE_DISABLE": "ON"
},
- "installDir": "$env{KF5}"
+ "inherits": [
+ "dev"
+ ]
},
{
"name": "unity",
"displayName": "Build with CMake unity support.",
- "generator": "Ninja",
- "binaryDir": "${sourceDir}/build-unity",
"cacheVariables": {
- "CMAKE_BUILD_TYPE": "Debug",
- "USE_UNITY_CMAKE_SUPPORT": "ON",
- "CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
+ "USE_UNITY_CMAKE_SUPPORT": "ON"
},
- "installDir": "$env{KF5}"
+ "inherits": [
+ "dev"
+ ]
},
{
"name": "release",
"displayName": "Build as release mode.",
- "generator": "Ninja",
- "binaryDir": "${sourceDir}/build-release",
"cacheVariables": {
- "CMAKE_BUILD_TYPE": "Release"
+ "CMAKE_BUILD_TYPE": "Release",
+ "BUILD_TESTING": "OFF"
},
- "installDir": "$env{KF5}"
+ "inherits": [
+ "base"
+ ]
},
{
"name": "profile",
"displayName": "profile",
- "generator": "Ninja",
- "binaryDir": "${sourceDir}/build-profile",
"cacheVariables": {
- "CMAKE_BUILD_TYPE": "RelWithDebInfo",
- "CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
+ "CMAKE_BUILD_TYPE": "RelWithDebInfo"
+ },
+ "inherits": [
+ "base"
+ ]
+ },
+ {
+ "name": "coverage",
+ "displayName": "coverage",
+ "cacheVariables": {
+ "CMAKE_BUILD_TYPE": "Debug",
+ "USE_UNITY_CMAKE_SUPPORT": "OFF",
+ "BUILD_COVERAGE": "ON"
},
- "installDir": "$env{KF5}"
+ "inherits": [
+ "base"
+ ]
},
{
"name": "clazy",
"displayName": "clazy",
- "generator": "Ninja",
- "binaryDir": "${sourceDir}/build-clazy",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
},
@@ -108,9 +122,26 @@
"CXX": "clazy",
"CCACHE_DISABLE": "ON"
},
- "installDir": "$env{KF5}"
+ "inherits": [
+ "base"
+ ]
+ },
+ {
+ "name": "ftime-trace",
+ "displayName": "ftime-trace",
+ "cacheVariables": {
+ "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": [
+ "dev"
+ ]
}
-
],
"buildPresets": [
{
@@ -118,50 +149,86 @@
"configurePreset": "dev"
},
{
- "name": "dev-disable-deprecated",
- "configurePreset": "dev-disable-deprecated"
+ "name": "ftime-trace",
+ "configurePreset": "ftime-trace"
},
{
- "name": "pch",
- "configurePreset": "pch"
- },
- {
- "name": "release",
- "configurePreset": "release"
+ "name": "dev-mold",
+ "configurePreset": "dev-mold"
},
{
"name": "dev-clang",
"configurePreset": "dev-clang"
},
{
- "name": "asan",
- "configurePreset": "asan"
+ "name": "release",
+ "configurePreset": "release"
},
{
"name": "unity",
"configurePreset": "unity"
},
+ {
+ "name": "coverage",
+ "configurePreset": "coverage"
+ },
+ {
+ "name": "asan",
+ "configurePreset": "asan"
+ },
{
"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": "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
+ }
+ }
]
}
diff --git a/autotests/CMakeLists.txt b/autotests/CMakeLists.txt
index be4f62d..d092ccf 100644
--- a/autotests/CMakeLists.txt
+++ b/autotests/CMakeLists.txt
@@ -1,4 +1,4 @@
-find_package(Qt6 ${REQUIRED_QT_VERSION} CONFIG REQUIRED Test)
+find_package(Qt6 ${QT_REQUIRED_VERSION} CONFIG REQUIRED Test)
include(ECMMarkAsTest)