[utilities/kate] /: Remove warning (found by cmake --warn-uninitialized -Werror=dev )
Christoph Cullmann <[email protected]>
| Newsgroups | gmane.comp.kde.cvs |
|---|---|
| Message-ID | <[email protected]> |
Git commit 6d137839ad1428fc21bc3ca6ffc43fe0123339ff by Christoph Cullmann, on behalf of Laurent Montel.
Committed on 25/07/2026 at 12:01.
Pushed by cullmann into branch 'master'.
Remove warning (found by cmake --warn-uninitialized -Werror=dev )
M +44 -31 CMakePresets.json
M +1 -1 addons/template/CMakeLists.txt
M +1 -0 apps/kate/CMakeLists.txt
M +1 -0 apps/kwrite/CMakeLists.txt
https://invent.kde.org/utilities/kate/-/commit/6d137839ad1428fc21bc3ca6ffc43fe0123339ff
diff --git a/CMakePresets.json b/CMakePresets.json
index 2675d57d13..32a5987349 100644
--- a/CMakePresets.json
+++ b/CMakePresets.json
@@ -7,27 +7,40 @@
"displayName": "base preset",
"generator": "Ninja",
"binaryDir": "${sourceDir}/build-${presetName}",
- "installDir": "$env{KF5}",
- "hidden": true
+ "installDir": "$env{KF6}",
+ "hidden": true,
+ "cacheVariables": {
+ "WARNINGS_AS_ERRORS": "ON"
+ }
},
{
- "name": "dev",
- "displayName": "Build as debug",
+ "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": "dev-qt6",
- "displayName": "Build against qt6",
- "binaryDir": "${sourceDir}/build-qt6",
+ "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",
- "BUILD_WITH_QT6": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
},
"inherits": [
@@ -48,34 +61,30 @@
{
"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"
]
},
{
"name": "release",
"displayName": "Build as release mode.",
"cacheVariables": {
- "CMAKE_BUILD_TYPE": "Release"
+ "CMAKE_BUILD_TYPE": "Release",
+ "BUILD_TESTING": "OFF"
},
"inherits": [
"base"
@@ -118,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"
]
}
],
@@ -136,16 +149,16 @@
"configurePreset": "dev"
},
{
- "name": "dev-qt6",
- "configurePreset": "dev-qt6"
+ "name": "ftime-trace",
+ "configurePreset": "ftime-trace"
},
{
- "name": "dev-clang",
- "configurePreset": "dev-clang"
+ "name": "dev-mold",
+ "configurePreset": "dev-mold"
},
{
- "name": "pch",
- "configurePreset": "pch"
+ "name": "dev-clang",
+ "configurePreset": "dev-clang"
},
{
"name": "release",
diff --git a/addons/template/CMakeLists.txt b/addons/template/CMakeLists.txt
index 67203116f6..75bb9141f3 100644
--- a/addons/template/CMakeLists.txt
+++ b/addons/template/CMakeLists.txt
@@ -1,4 +1,4 @@
-find_package(KF6 ${KF_MIN_VERSION} COMPONENTS
+find_package(KF6 ${KF6_DEP_VERSION} COMPONENTS
Archive
Config
)
diff --git a/apps/kate/CMakeLists.txt b/apps/kate/CMakeLists.txt
index 1c8507d89f..86a5efc681 100644
--- a/apps/kate/CMakeLists.txt
+++ b/apps/kate/CMakeLists.txt
@@ -45,6 +45,7 @@ set(ICON_FILES
${ICONS_FOLDER}/512-apps-kate.png
)
+set(ICONS_SOURCES)
# Add icon files to the application's source files to have CMake bundle them in the executable.
ecm_add_app_icon(ICONS_SOURCES ICONS ${ICON_FILES})
target_sources(kate-bin PRIVATE ${ICONS_SOURCES})
diff --git a/apps/kwrite/CMakeLists.txt b/apps/kwrite/CMakeLists.txt
index 0010d670fd..9e4c4e383a 100644
--- a/apps/kwrite/CMakeLists.txt
+++ b/apps/kwrite/CMakeLists.txt
@@ -23,6 +23,7 @@ set(ICON_FILES
)
# Add icon files to the application's source files to have CMake bundle them in the executable.
+set(ICONS_SOURCES)
ecm_add_app_icon(ICONS_SOURCES ICONS ${ICON_FILES})
target_sources(kwrite PRIVATE ${ICONS_SOURCES})