Age | Commit message (Collapse) | Author |
|
The message read odd with the missing be
|
|
OpenBSD has a similar patch inside the ports, see
Allow KDE5 libraries to be built without having to link to libc explicitly.
Index: kde-modules/KDECompilerSettings.cmake
--- kde-modules/KDECompilerSettings.cmake.orig
+++ kde-modules/KDECompilerSettings.cmake
@@ -530,6 +530,8 @@ endfunction()
# Better diagnostics (warnings, errors)
############################################################
+set(ALLOW_UNDEFINED_LIB_SYMBOLS No CACHE BOOL "allow undefined symbols in generated shared objects")
+
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT APPLE) OR
(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND NOT APPLE) OR
(CMAKE_CXX_COMPILER_ID STREQUAL "Intel" AND NOT WIN32))
@@ -537,9 +539,11 @@ if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU" AND NOT APPL
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--fatal-warnings ${CMAKE_SHARED_LINKER_FLAGS}")
set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--fatal-warnings ${CMAKE_MODULE_LINKER_FLAGS}")
- # Do not allow undefined symbols, even in non-symbolic shared libraries
- set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
- set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_MODULE_LINKER_FLAGS}")
+ if (NOT ${ALLOW_UNDEFINED_LIB_SYMBOLS})
+ # Do not allow undefined symbols, even in non-symbolic shared libraries
+ set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_SHARED_LINKER_FLAGS}")
+ set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined ${CMAKE_MODULE_LINKER_FLAGS}")
+ endif()
endif()
set(_KDE_GCC_COMMON_WARNING_FLAGS "-Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef")
|
|
Given ECM is released tightly bundled with KF, which itself requires
Qt 5.15 now, and no Linux distribution is known by repology.org which
ships older Qt, but current ECM, that support is considered of no more use.
|
|
Given ECM is released tighly bundled with KF, which itself requires
Qt 5.15 now, and no Linux distribution is known by repology.org which
ships older Qt, but current ECM, that support is considered of no more use.
|
|
|
|
The use of set_package_properties() requires the include, which might
not have been done by the macro consumer.
|
|
If the module is not included, the current message would be misleading.
Including the module by default is undesirable, because we print out a warning
that we do not override an existing module. While this warning is reasonable in most
cases, it is annoying for projects that have a custom clang-format file.
Checking if a .clang-format file exists and if not including KDEClangFormat is fragile,
because it depends on the include order of the modules.
Considering all that, a proper warning with instructions on how to fix the issue
is IMHO the best way to go.
|
|
|
|
I was getting CMake errors in repositories that had a pre-existing commit
hook: `string sub-command FIND requires 3 or 4 parameters.`
Adding quotes around the variables from 6224e7b8c28d434b81a19ac47b88cb58fee9d7d5
fixes this issue for me.
|
|
|
|
@aacid related to your MR !245
|
|
QQmlImportDatabase::resolvePlugin doesn't accept lib prefixes under
Windows, causing to fail to import when using as a dynamic plugin.
Inspired by kirigami!34
|
|
Allows us to avoid using source variables.
|
|
Allows us to avoid using source variables.
|
|
This means removing the find_program() logic, since it was only useful if
we don't want to make CMake spend time finding a compiler; so it was only
useful for building modules that don't need a compiler at all, wallpapers,
icon themes ...etc; so find_program() is only useful when it comes before
the find_package() and enable_language() calls. Thanks to Christophe
Giboudeaux for the explanation. This might make the build time for such
modules a tiny bit longer, but it's worth it to make finding qmake/qtpaths
|
|
If the .git/hooks/pre-commit already exists, only add the clang-format line
if it doesn't already exist.
|
|
If clang-format isn't found, there is nothing to write to the file.
|
|
|
|
|
|
Fix finding qmake when executable has no version suffix
|
|
Like is done in the Qt5 qmake code path.
|
|
Some applications look for ECM and need to know Qt paths but
don't need to link to anything. That's the case for icons or
wallpapers.
For these cases, ECMQueryQt will first try to find qmake or
qtpaths before looking for Qt CMake config files.
Also handle cases where project() sets 'LANGUAGE' to 'NONE'.
The CXX language needs to be enabled for find_package to look
for Qt into library dirs.
|
|
|
|
If the tests use Qt we need to forward the Qt major version option
as well.
|
|
|
|
Which is a drop-in replacement, one just needs to replace query_qmake with
ecm_query_qt.
Copied the deprecation code from ECMQMLModules.cmake, saved a bit of
research time on how to do that in CMake.
|
|
|
|
Continuation of commit 4e47b053c9d799.
All unittests still pass.
|
|
By using ${CMAKE_COMMAND} we make sure the current cmake is used,
instead of relying that some cmake can be found in the path
|
|
It should be --extensions "cpp,h,hpp,c"; previously, I naively tested that
it didn't bother .json files, but I not if it'll actually trigger for e.g.
a .h file...
|
|
|
|
|
|
Basically copied ECMQueryQmake to ECMQueryQt, added copyright based
on git log, with the BSD 3-clause license; based on the contents of the
README.rst file at the initial commit (commit 96e7fb9969b7 by Rohan Garg) of
ECMQueryQmake, the README file says:
All code is licensed under the BSD 3-Clause license.
Will CC active devs in the MR and email Rohan Garg to confirm.
Then added qtpaths CMake code path, basically you can use query_qt with Qt5
(same syntax, so a drop-in replacement for query_qmake); and Qt6.
The plan is to deprecate ECMQueryQmake in favour of the new module (had to
be done that way as the old module had "qmake" in the name and that could
be a bit confusing).
|
|
and target
Previously the clang-format.sh git hook script didn't specify the file
extensions to format; however it looks like with recent(?) clang-format
versions 'git clang-format' will consider .json files if such files were
changed by a commit, which makes the script fail, see:
https://invent.kde.org/frameworks/extra-cmake-modules/-/merge_requests/254
Sepcify the file extensions by passing --extensions to 'git clang-format'
command.
Also add ".hpp" to the file extensions we format, and use the same list of
file extensions everywhere.
|
|
I hit this issue while building Kaidan using craft,
outside of the KDE Android docker container. Hopefully this is the
correct way to fix it.
|
|
|
|
If we are not tracking a specific branch, assume the remote is "origin"
which is git's default.
|
|
These are the variables that cmake will pass onto itself when doing a
try_compile, we need that because otherwise when trying to find iconv it
will issue a try compile, won't pass CMAKE_ANDROID_API so it will
default to 21 (instead eg the 28 we had given it) and the try_compile
will fail because android libc only has iconv after API 28
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This fixes KDEInstallDirsTest.relative_or_absolute_qt unittest.
|
|
- We don't need the Threads target workaround anymore, that breaks the
build with Qt6 even.
- The Gradle wrapper shipped with Qt is no longer installed as executable,
so we need to run this in sh explicitly.
- Qt6 uses a different Android Gradle plugin version (not to be confused
with the Gradle version), which we need to make available for the
configure_file() call on the build.gradle file.
With this most Framework modules build against Qt6 here.
|
|
|
|
Since KDEInstallDirs6 explicitly sets KDE_INSTALL_DIRS_NO_DEPRECATED to
false.
|