aboutsummaryrefslogtreecommitdiff
path: root/kde-modules
AgeCommit message (Collapse)Author
2021-01-17Comply with naming conventions for optional parametersAlexander Lohnau
2021-01-16Improve alignment of argumentsAlexander Lohnau
2021-01-16Fix typoDavid Faure
GIT_SILENT
2021-01-16Add cmake function to configure git pre-commit hooksAlexander Lohnau
This will allow us to force QS checks before the developer commits a change. Currently only clang-format is supported, but as on #plasma and https://phabricator.kde.org/T11214 discussed we might want to add different formatters. By making the checks configurable we are flexible and can easily extend it.
2021-01-05fix tar argumentsJuerg Marti
2021-01-02Tell MSVC that our source files are UTF-8 encodedv5.78.0-rc1v5.78.0Volker Krause
For GCC/Clang that is the default, but not for MSVC. This can cause both compile-time and runtime errors when encountering string literals that contain more than just 7bit ASCII. Some of our modules set this already, others use various other workarounds to avoid Utf-8 literals, so better do this consistently and centrally. Qt6 will also set this by default. This is actually Hannah's finding from debugging issues caused by this in kitinerary, I'm just submitting the patch.
2021-01-01[clang-format] Break before non-assignment operatorsAlexander Lohnau
2020-12-31[clang-format] Set max column limit to 160Alexander Lohnau
Before this value was 240, which can result in excessively long lines.
2020-12-27Merge branch 'work/hefee/reproducable'Sandro Knauß
2020-12-27Reproducible tarballs with GNU tar onlyAdriaan de Groot
- Search for a suitable `tar` program - Check version output if it's GNU tar Since this function is typically run only once per repo, there's not much point in doing extra cache work or writing a separate find-module.
2020-12-14API dox: note that KDEInstallDirs sets CMAKE_INSTALL_PREFIX if still defaultFriedrich W. H. Kossebau
NO_CHANGELOG
2020-12-04clang-format: No space before initializer listv5.77.0-rc1v5.77.0Alexander Lohnau
2020-12-01Define install dir variable for file templatesAlexander Lohnau
Just like the app templates the file templates have a specific install location. Also the KTEMPLATESDIR is only used as a fallback, because it suggests that all templates are in that dir, which is not true.
2020-11-16Fix updating of apptemplate tarsAlexander Lohnau
With this MR cmake gets rerun when the dirs/subdirs of the template change. And by setting the `DEPENDS` property of the tar command to this list of the dirs/subdirs of the template we ensure that the command gets executed whenever the files change.
2020-11-02Make KDEPackageAppTemplates to create reproducible tarball.Scarlett Clark
By default tar glues files in a random order together, this makes the output non reproducible. In order to fix, produce a sorted output and uniquify user/group and chmod.
2020-11-01Make androiddeployqt find libraries and QML plugins without installationv5.76.0-rc1v5.76.0Volker Krause
This matters for libraries in the same repository as the application that also have an AAR that needs to be integrated, as well as QML plugins. For this to work we need to consider the build directory as a search prefix, and produce the exact directory layout there that androiddeployqt expects. For libraries this is then almost transparent for the application build system, the only thing that needs to be taken care of manually is putting the corresponding -android-dependencies.xml file into the right place in the build dir as well. A macro wrapping that might be an option to centralize that logic here as well in the future. For QML plugins this is transparent if you have them set up to work without installation already anyway, otherwise that setup has to be done for this to work. Example: https://invent.kde.org/pim/itinerary/-/merge_requests/28 https://invent.kde.org/frameworks/knotifications/-/merge_requests/12 would presumably also need this (not tested yet).
2020-10-23improve default formatting optionsChristoph Cullmann
1) remove AlignTrailingComments: true => this avoids multiline comment changes if e.g. one longer member/variable is added with comments behind it 2) add AllowShortLambdasOnASingleLine: Empty => avoid the uglification of lambdas
2020-10-01fix fetch-translations for invent urlsv5.75.0-rc1v5.75.0Harald Sitter
regex gets slightly adjusted to only run on kde.org urls, the actual repo name may now contain slash as well since a) basenames aren't necessarily unique anymore b) by extension we need to give fetchpo an actually unique repo path so it can resolve the underlying project and its translations
2020-06-14extra-cmake-modules: Convert to SPDX license statementsAndreas Cord-Landwehr
2020-01-28Add missing Import Env Variablev5.67.0-rc1v5.67.0Tomaz Canabrava
Summary: Without this, in Qt 5.14 I get an android-like QQC2 theme This used to work on Qt 5.13 so I assume that it's a regression Reviewers: mart Reviewed By: mart Subscribers: apol, davidedmundson, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D26573
2019-12-19API dox: fix rst syntax for KDEClangFormat textFriedrich W. H. Kossebau
2019-12-05EBN extra-cmake-modules transport cleanupv5.65.0-rc1v5.65.0John Hayes
Summary: Change transport protocol from http to https Reviewers: apol, cgiboudeaux Reviewed By: apol, cgiboudeaux Subscribers: cgiboudeaux, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D25753
2019-11-26Fix typoDavid Edmundson
2019-11-26Explicitly use lib for systemd directoriesDavid Edmundson
Systemd searches "/usr/local/lib/systemd/user", "/usr/local/share/systemd/user", USER_DATA_UNIT_PATH, "/usr/lib/systemd/user", "/usr/share/systemd/user", LIBDIR could be lib or lib64, so we need to be explicit here. Reviewed on D25107
2019-11-06Documentation typo correctionDavid Edmundson
2019-11-03Add install dir for systemd unitsDavid Edmundson
Summary: Like we have for other FD.O projects like DBus service files Test Plan: Unit test passes Used in another project, and it installed to the correct place Reviewers: apol Reviewed By: apol Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D25107
2019-11-03KDEFrameworkCompilerSettings: enable all Qt % KF deprecation warningsFriedrich W. H. Kossebau
Reviewers: #frameworks, #build_system, apol, dfaure Reviewed By: apol, dfaure Subscribers: dfaure, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D24990
2019-10-23Don't set C/C++ standards if already setDavid Faure
Summary: Fixes regression from https://phabricator.kde.org/D24841 Reviewers: cgiboudeaux Reviewed By: cgiboudeaux Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D24882
2019-10-22Use modern way to set the C/CXX standadHannah von Reth
Summary: This allows later modification of the selected standard. Raise C from C89 to C90 as C89 is not supported by the CMAKE flag https://cmake.org/cmake/help/v3.16/prop_tgt/C_STANDARD.html#prop_tgt:C_STANDARD Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D24841
2019-10-20Provide clang-format target with a KDE Frameworks style fileChristoph Cullmann
Summary: Provides a clang-format target if wanted Example usage: include(KDEClangFormat) # add clang-format target for all our real source files file(GLOB_RECURSE ALL_CLANG_FORMAT_SOURCE_FILES autotests/src/*.cpp autotests/src/*.h src/*.cpp src/*.h templates/*.cpp templates/*.h) kde_clang_format(${ALL_CLANG_FORMAT_SOURCE_FILES}) Test Plan: Tried that above usage thingy in KTextEditor Reviewers: #frameworks, dfaure Reviewed By: dfaure Subscribers: zzag, sitter, mwolff, ochurlaud, nalvarez, kossebau, aacid, davidedmundson, dhaumann, apol, ognarb, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D24568
2019-10-01new module ECMSourceVersionControlv5.63.0-rc2v5.63.0-rc1v5.63.0Harald Sitter
Summary: simply sets a variable when the source is under version control. use it to auto-enable Debug builds. there are also plans to switch special assertion logic on in KIO when used from git, so there definitely is a more generic use case of wanting to control behavior based on whether it the source is likely used to make a development or production build. conceivably the module could be used in the future to get git rev-parse or the like, hence the generic name. Test Plan: with .git the var is true, without it is false Reviewers: kde-buildsystem, dfaure Reviewed By: dfaure Subscribers: apol, kossebau, kde-frameworks-devel Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D24159
2019-08-28Keep 'lib' as default LIBDIR on Arch Linux based systemsAntonio Rojas
Port of upstream commit https://gitlab.kitware.com/cmake/cmake/commit/18365587c86396f988e256b5acf4d2312f3be2bb Differential Revision: https://phabricator.kde.org/D23497
2019-08-19disable autouic again - it breaks buildsHarald Sitter
Summary: autouic (like automoc) assumes that every ui_*.h include statement it finds relates to a .ui file that needs generating. this is not always true. e.g. we have software which generates ui_debug.h which is simply a qloggingcategory header for the UI category of that software which would then trip up autouic because it would assume there's a .ui file when there really isn't one. unfortunately the ui_ assumption cannot be selectively disabled, so we can't have explicit listing of .ui in source lists ``` set(foo_SRCS foo.cpp foo.ui) ``` without also getting the not particularly compatible include assumptions. this should be revisited for kf6 since there isn't a technical need for files to be called ui_*, they could just as well be *_ui or anything else so as to not clash with autouic assumption. autorcc does not suffer from this problem so we can leave it enabled, for now anyway. Test Plan: sonnet builds again Reviewers: apol, nicolasfella, cullmann Reviewed By: apol Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D23262
2019-08-19set autorcc and autouic by defaultHarald Sitter
Summary: I couldn't find any pertinent discussion on the topic but some reviews I stumbled over did set it on some of our application repos and also wonder why we don't enable it by default. autorcc allows more idiomatic use of qrc as they may be used like any "ordinary" source file and cmake will know what to do with them (namely compile into relevant cpp for inclusion in target) without the developer having to worry about anything. autouic does the same albeit for .ui files. Test Plan: .qrc files can be added to src list variables and will get automatically generated into cpp files in the binary dir and built into the target Reviewers: apol Reviewed By: apol Subscribers: cgiboudeaux, vkrause, kossebau, apol, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D22805
2019-08-15Define install location for JAR/AAR files for AndroidVolker Krause
Summary: This follows where Qt installs those, and thus androiddeployqt looks for them. Currently this is hardcoded in knotifications for example, seems cleaner to have this here. Reviewers: #build_system, #android, apol Reviewed By: #android, apol Subscribers: apol, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D23131
2019-07-25Notify users when not using KDE_INSTALL_USE_QT_SYS_PATHS about prefix.shAleix Pol
Summary: It's especially when KDE_INSTALL_USE_QT_SYS_PATHS=OFF that the different environment variables will have to be initialised. This adds a message that should tell users about the script so they have a hint of what is going on. Reviewers: #frameworks, albertvaka, cgiboudeaux Reviewed By: albertvaka, cgiboudeaux Subscribers: cgiboudeaux, albertvaka, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D22580
2019-07-23Provide a more sensible CMAKE_INSTALL_PREFIX defaultAleix Pol
Summary: If no prefix is passed, use ECM's by default, instead of defaulting to /usr/local which isn't optimal in any case. Reviewers: cgiboudeaux Reviewed By: cgiboudeaux Subscribers: cgiboudeaux, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D22676
2019-07-23Make the default build type "Debug" when compiling a git checkout.David Faure
Summary: The idea comes from https://blog.kitware.com/cmake-and-the-default-build-type/ but I adapted it to leave it empty for tarballs, to avoid messing up distribution packaging. The goal is to make this more sensible for [new] developers who just run cmake and end up with a "no debug symbols, no optimizations" build, i.e. the one and only completely useless combination of those two flags. Possible risk: distributions who compile from git checkouts... Test Plan: "mkdir build ; cd build ; cmake .." in kblog leads to CMAKE_BUILD_TYPE=Debug Reviewers: kde-buildsystem, cgiboudeaux Reviewed By: cgiboudeaux Subscribers: cgiboudeaux, apol, kde-frameworks-devel Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D22667
2019-05-31Create specific directory for Qt logging categories filev5.59.0-rc1v5.59.0Laurent Montel
Summary: kdebugsettings categories files Reviewers: dfaure, cgiboudeaux Reviewed By: cgiboudeaux Subscribers: kossebau, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D21313
2019-05-22Don't enable QT_STRICT_ITERATORS on Windows.David Faure
Summary: Strict iterators can't be used on Windows, they lead to a link error when application code iterates over a QVector<QPoint> for instance, unless Qt itself was also built with strict iterators. See example at https://bugreports.qt.io/browse/AUTOSUITE-946 Technically this would be fine for mingw, but not for MSVC neither clang-cl (which also uses the MSVC ABI). I think it's fine to just disable it for all Windows compilers, since any iterators misuse will be detected on Unix anyway. Test Plan: None, I'm relying on Volker's findings. Reviewers: vkrause, dvratil Reviewed By: dvratil Subscribers: apol, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D21314
2019-04-07Unconditionally enable -DQT_STRICT_ITERATORS, not just in debug modeDavid Faure
Summary: It turns out QT_STRICT_ITERATORS does not introduce any overhead (they are inlined so everything gets optimized), confirmed by Dan comparing the produced assembly in Compiler Explorer. Reviewers: dvratil, mlaurent, aacid Reviewed By: aacid Subscribers: aacid, kde-buildsystem, kde-frameworks-devel Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D20349
2019-03-23Revert "Take clang-cl into account"Christian Mollekopf
This reverts commit 2e1cb0c453f419da134b850052da6c804cae05e0. This was an accidental push to master, sorry for the noise.
2019-03-23Take clang-cl into accountChristian Mollekopf
2019-02-22Fix releaseme checkout when this is included in a sub-directoryVolker Krause
Summary: This fixes the Marble build on binary factory. Reviewers: apol Reviewed By: apol Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D19223
2019-02-03Fix ENABLE_CLAZY option with clazy >= 1.5Elvis Angelaccio
Summary: clazy 1.5 renamed its plugin from from `ClangLazy.so` to `ClazyPlugin.so` and from `clang-lazy` to `clazy`. Reviewers: apol, smartins Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D18680
2019-01-19Move -Wsuggest-override -Wlogical-op to regular compiler settingsAlbert Astals Cid
Summary: They really help making the code better so it's good to have all applications getting those warnings Subscribers: apol, vkrause, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D18167
2019-01-09Use more https in linksFriedrich W. H. Kossebau
2018-12-21Revert "Clang: don't enable -Wzero-as-null-pointer-constant on 5.0.0"v5.54.0-rc1v5.54.0David Faure
This reverts commit e1adaa7ebab1b0de72c82d95bdf568e435713a4e. Version number confusion.
2018-12-20Clang: don't enable -Wzero-as-null-pointer-constant on 5.0.0David Faure
Summary: The clang compiler in Android NDK r15b, which has version 5.0.300080, warns as follows: warning: unknown warning option '-Wzero-as-null-pointer-constant'; did you mean '-Wint-to-void-pointer-cast'? [-Wunknown-warning-option] Test Plan: Removing the option removes the warning Reviewers: aacid, cgiboudeaux, apol Reviewed By: cgiboudeaux Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D17714
2018-11-12Use `MATCHES "Clang"` to detect clangRené J.V. Bertin
This is for compatibility with Apple's Xcode compilers which identify as AppleClang. Differential Revision: https://phabricator.kde.org/D16816