aboutsummaryrefslogtreecommitdiff
path: root/kde-modules
AgeCommit message (Collapse)Author
2021-08-16Enable KDEGitCommitHooks on WindowsHannah von Reth
Git on Windows provides bash
2021-07-20suppress tar errorsAdriaan de Groot
With non-GNU tar, passing the --sort option may print out an error message saying the option isn't supported; that's confusing and not useful to the consumer.
2021-07-19Move ENABLE_BSYMBOLICFUNCTIONS documentation in its own moduleAleix Pol
2021-07-17Define NOMINMAX on WindowsHannah von Reth
This will prevent the macro definition of min and max which breaks the use of std::min and std::max
2021-07-16KDEFrameworksCompilerSettings: move backward-compat code into separate fileFriedrich W. H. Kossebau
Also add trigger to switch to KDE_COMPILERSETTINGS_LEVEL of latest KDECompilerSettings on ECM dependency in KF modules to 5.85 NO_CHANGELOG
2021-07-16KDECompilerSettings: properly use KDE_QT_MODERNCODE_DEFINITIONS_LEVELFriedrich W. H. Kossebau
MO_CHANGELOG
2021-07-16KDECompilerSettings: support multiple inclusion and auto-levelsFriedrich W. H. Kossebau
Existing projects have muliple calls of find_package(ECM) and include(KDECompilerSettings), usually in pairs, e.g. for forks of 3rd-party software or examples. While this is not a recommnended setup, as there is no official mechanism to properly reset previously created setings, those existing projects and their releases can be supported by discarding any auto-level values at the end of the include, so the next can pick up again the value of any closer find_package(ECM) call. NO_CHANGELOG
2021-07-15KDECompilerSettings: fix message status on too high KDE_COMPILERSETTINGS_LEVELFriedrich W. H. Kossebau
Also print current values for more context NO_CHANGELOG
2021-07-15KDEFrameworksCompilerSettings: remove hardcoded KDE_COMPILERSETTINGS_LEVELFriedrich W. H. Kossebau
No longer needed, also triggering wrong warning about KDE_COMPILERSETTINGS_LEVEL value for 3rd-party users requiring older ECM NO_CHANGELOG
2021-07-13Fix typos found by codespellChristophe Giboudeaux
GIT_SILENT
2021-07-13KDEFrameworksCompilerSettings: guard ENABLE_BSYMBOLICFUNCTIONS by ECM versionFriedrich W. H. Kossebau
NO_CHANGELOG
2021-07-12Fix windows build on CIAhmad Samir
GIT_SILENT
2021-07-12Handle case where ECM_GLOBAL_FIND_VERSION is undefinedChristophe Giboudeaux
If no minimum ECM version is required, ECM_GLOBAL_FIND_VERSION is empty and the version comparison fails. Amends: 12af1e4e5
2021-07-12Enable the usage of -Bsymbolic-functionsAleix Pol
Checks if the compiler supports it and if so it enables it by default. This is useful as it allows to perform internal linking operations at build time that otherwise would have been delayed until process startup time.
2021-07-10Revert "KDEFrameworksCompilerSettings: use latest KDECompilerSettings"Friedrich W. H. Kossebau
Has to wait until KF requires ECM 5.85.0 This reverts commit e6f87fa7427a2edde7dd8a47ace21011169d2650. NO_CHANGELOG
2021-07-10KDEFrameworksCompilerSettings: use latest KDECompilerSettingsFriedrich W. H. Kossebau
NO_CHANGELOG
2021-07-10KDECompilerSettings: add KDE_COMPILERSETTINGS_LEVEL & more settingsFriedrich W. H. Kossebau
There is desire for having more strict compiler settings by default over what the KDECompilerSettings have been declaring until now. This means making more use of modern features usually and being less tolerant about the use of deprecated ones. While some projects have used KDEFrameworksCompilerSettings to get more modern requirements by just a single macro include, that was not the intent of that module, and now is also warned about in the docs. Instead of adding a new separate dedicated module e.g. named KDEStricterCompilerSettings, with a separate version scheme for sets of strict settings, the existing KDECompilerSettings macro file is instead extended as well as are the ECM versions reused to define the different sets of settings. As these settings are getting more strict by the time, e.g. allowing less of old & deprecated code, these sets are considered as kind of levels. To enable the clients to control the required settings level, a dedicated variable KDE_COMPILERSETTINGS_LEVEL is introduced, which for convenience defaults to the minimum required ECM version, so only needs to be set when the need for other newer features provided by ECM does not go along the settings level of that ECM version. As some projects might have needs not exactly matching a certain settings level, additionally the settings can be optionally individually controlled by specific variables, to be set again before including KDECompilerSettings.
2021-06-29Make pre-commit hook executableMilian Wolff
Otherwise recent versions of git will complain with: ``` hint: The '.git/hooks/pre-commit' hook was ignored because it's not set as executable. hint: You can disable this warning with `git config advice.ignoredHook false`. ```
2021-06-28KDECompilerSettings: revert setting CMAKE_C(XX)_EXTENSIONSFriedrich W. H. Kossebau
Some projects using KDECompilerSettings need more control about whether this is set, as 3rd-party projects linked to might not meet those requirements. To be reworked and added later with consumer control options
2021-06-27cmake: Explicetely disable c/c++ compiler extensionsAlbert Astals Cid
We're a multi-compiler project, so disable compiler specific extensions
2021-06-25KDEFrameworkCompilerSettings: add warning note to only use for KF modulesFriedrich W. H. Kossebau
NO_CHANGELOG
2021-06-19Set the C++17 standard starting from 5.84Ahmad Samir
2021-06-19Bump the C++ standard we compile with to 17Ahmad Samir
But only for repos that require Frameworks 5.83 or newer. We have asked on the KDE distributions mailing list and distro maintainers didn't object to the change (since most distros already have recent enough compilers).
2021-06-13Override atime and ctime in tar PaxHeadersBernhard M. Wiedemann
to make build results deterministic See https://reproducible-builds.org/ for why this is good. related to https://phabricator.kde.org/D25494 Without this patch, openSUSE's kio package varied in /usr/share/kdevappwizard/templates/ioslave.tar This PR was done while working on reproducible builds for openSUSE.
2021-06-12Add prefix.sh.fish file for fish shellAlexander Lohnau
2021-05-27Provide fallback error when no .clang-format file is presentAndreas Cord-Landwehr
This check fixes a probably rare case, where we land in a repository that contains this clang-format.sh hook but where the format file went missing. In such cases, clang-format falls back to the system defaults, which brings undesired defaults, e.g. enforced line breaks in comments after 90 chars, which cannot easily be reverted by a reformat. Since clang-format's --fallback-style=none option is not available for git clang-format, this comment reimplements the logic.
2021-05-25Clean ECM files after the minimum version changeChristophe Giboudeaux
- Remove deprecated version checks - Use VERSION_GREATER_EQUAL
2021-05-18appstreamtest: Check if file exists before testing itAlexander Lohnau
In case one has uninstalled the project, but has made local changes that should be tested the test would fail. Instead check if the files exist before adding them to the list of files that will be tested.
2021-04-23Modules docs: move rst docs into bracket commentsFriedrich W. H. Kossebau
CMake >= 3.0 supports bracket comments, and the reStructuredText integration code in sphinx/ext/ecm.py already supports extracting the docs from a bracket comment instead. Editing documentation without leading line comment markers is more simple, e,g. when reflowing text over lines. With ECM meanwhile requiring CMake 3.5 now it is possible to switch (and thus follow also the approach used by cmake itself). NO_CHANGELOG
2021-04-20clang-format: Add links to clang-format docs and coding style wikiAlexander Lohnau
2021-04-17Add link to clang-format options documentationAhmad Samir
2021-04-16clang-format: Disable formatting for JS filesAlexander Lohnau
2021-04-14Fix static Windows builds by not setting /NODEFAULTLIB:libcmt /DEFAULTLIB:msvcrtHannah von Reth
If we tell the compiler to link the runtime statically and then explicitly link the dynamic runtime and prohibit the static we continue to produce dynamic builds...
2021-02-16clang-format: set AlwaysBreakTemplateDeclarations to trueAhmad Samir
This matches most of the existing code in KDE; also note that Qt has the same setting (also stating in a comment in their _clang-format that this matching their existing code).
2021-02-10Add clang-format target by default in KDEFrameworkCompilerSettingsAlexander Lohnau
To prevent cmake errors with exiting usages it is checked if the target already exists.
2021-02-08Define relative paths when KDE_INSTALL_USE_QT_SYS_PATHS is enabledDaan De Meyer
When building multiple KDE projects, installing them to "$DESTDIR" and having cmake look for kde dependencies in "$DESTDIR" using "CMAKE_PREFIX_PATH=$DESTDIR/usr", we currently get failures when calling find_package() on projects that use KDE_INSTALL_QTPLUGINDIR, KDE_INSTALL_QTQMLDIR and KDE_INSTALL_QTQUICKIMPORTSDIR because these are defined as absolute paths when KDE_INSTALL_USE_QT_SYS_PATHS is enabled. This commit defines these paths relative to qmake's QT_INSTALL_PREFIX property instead when KDE is install to the same prefix as Qt. This fixes DESTDIR installations because with relative paths, CMake will search for these paths in "$DESTDIR" as well as "/". We limit this change to the scenario where the Qt and CMake install prefixes are the same because always doing this would break backwards compatibility as qml and plugins would be installed into CMAKE_INSTALL_PREFIX instead of QT_INSTALL_PREFIX after this change.
2021-02-05Only enable GNU_TAR_FOUND when --sort=name is availablev5.79.0-rc2v5.79.0-rc1v5.79.0Milian Wolff
The --sort=name option was only added in version 1.28 which isn't available in Centos 7 yet e.g.
2021-01-31KDEFrameworksCompilerSettings: define -DQT_NO_KEYWORDS by defaultFriedrich W. H. Kossebau
2021-01-30Improve documentation for KDEClangFormat moduleAlexander Lohnau
2021-01-30[KDEGitCommitHooks] Create copy of scripts in source dirAlexander Lohnau
It was reported that in case of containerized setups where the source and build are in different containers the pre-commit script would reference a file which is another container and is consequently not found. To avoid this the script is copied in the source dir and a relative path is defined.
2021-01-30Remove optional parameterAlexander Lohnau
This makes it more difficult to implement the relative paths. It would be nice to have, but if we encounter a scenario where we explicitly need this we can revisit it.
2021-01-30KDEClangFormat: Do not override custom clang-format filesAlexander Lohnau
2021-01-29Define -DQT_NO_FOREACH by defaultFriedrich W. H. Kossebau
2021-01-22fetch-translations: Resolve the URL before passing it to fetchpo.rbAleix Pol
This way we pass the regex on an actual URL that we may understand. This is especially useful when url.insteadOf entries are specified in ~/.gitconfig.
2021-01-21ignore source files in CMAKE_BINARY_DIR for clang-format targetChristoph Cullmann
2021-01-20Add detailed explanation for KDEGitCommitHooks checksAlexander Lohnau
2021-01-19Revert "Add clang-format target by default in KDEFrameworkCompilerSettings"Alexander Lohnau
This reverts commit a6be96a0c84b215de7f6fb397255af252adf7fc1.
2021-01-19Add clang-format target by default in KDEFrameworkCompilerSettingsAlexander Lohnau
To prevent cmake errors with exiting usages it is checked if the target already exists.
2021-01-18add status message to each formatting stepChristoph Cullmann
2021-01-18fix issues with too long command line lengthChristoph Cullmann