aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2021-11-30ECMGeneratePkgConfigFile: Add an URL parameterHeiko Becker
While porting a manual configure_file invocation for kactivities' .pc file to ecm_generate_pkgconfig_file I noticed that the URL keyword was missing afterwards.
2021-11-08Add support for specifying private dependencies for pkg-config filesIngo Klöcker
2021-08-06Add another test for ECMSetupVersionChristophe Giboudeaux
Amends: f0790f910 GIT_SILENT
2021-08-05ecm_setup_version: deal with 0-prefixed version values in PROJECT modeFriedrich W. H. Kossebau
5c191fa1d2383c69ddc075395e04f84b7679613a already added the same sanity check for the non-PROJECT mode
2021-07-13Fix typos found by codespellChristophe Giboudeaux
GIT_SILENT
2021-05-25Clean ECM files after the minimum version changeChristophe Giboudeaux
- Remove deprecated version checks - Use VERSION_GREATER_EQUAL
2021-05-21ecm_create_qm_loader: support target as alternative argumentFriedrich W. H. Kossebau
2021-05-15ECMAddAppIcon: support target as argumentFriedrich W. H. Kossebau
2021-05-10ECMSetupVersion: phase out deprecated *_VERSION_STRING CMake variablesFriedrich W. H. Kossebau
2021-05-07Order macro for attribute for symbol export before that for deprecatedFriedrich W. H. Kossebau
The symbol export/visibility attribute is not standardized so far and needs to be set by language extension attribute declaration at least with clang & MSVC, who both support that when it appears before the standard attribute declaration. NO_CHANGELOG
2021-04-28ECMGenerateExportHeaderTest: try to fix tests for MSVCv5.82.0-rc1v5.82.0Friedrich W. H. Kossebau
NO_CHANGELOG
2021-04-25ECMGenerateExportHeader: unbreak builds by not mixing std & legacy attributesFriedrich W. H. Kossebau
NO_CHANGELOG BUG: 436155
2021-04-24ECMGenerateExportHeader: add macros for enumerator deprecation warningFriedrich W. H. Kossebau
2021-02-26Fix ECMCheckOutboundLicenseTest to find the FindReuseTool.cmake filev5.80.0-rc1v5.80.0Friedrich W. H. Kossebau
2021-01-17ECMQtDeclareLoggingCategory: create .categories files in build, not configureFriedrich W. H. Kossebau
Ensures that the files * are re-created by build rule when accidentally deleted in the build dir * are not getting new timestamps on every cmake run, even when content has not changed
2020-12-13Fix errors in python code, found by pylama in a strict CIDavid Faure
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-09-26Include FeatureSummary and find modulesAndreas Cord-Landwehr
Required for module test to pass.
2020-09-26Fix windows ci tests because of differences in ecm logic on windows.Jeremy Whiting
According to https://api.kde.org/ecm/module/ECMGenerateDBusServiceFile.html the macro being tested works differently on windows. The path to the binary executable is removed on windows.
2020-09-26Introduce plausibility check for outbound licenesAndreas Cord-Landwehr
When creating a library or executable, several source files are combined into a binary artifact that has an outbound license of its own. This test generator allows to check if the combined source files are compatible with the desired outbound license. Requirements for using these tests: - input source files must contain the SPDX-License-Information tag - python3 must be available - the "reuse spdx" tool must be available
2020-09-18add RENAME parameter to ecm_generate_dbus_service_fileHenri Chain
2020-07-10Add ecm_generate_dbus_service_fileHenri Chain
Summary: It serves as a replacement for `kdbusaddons_generate_dbus_service_file`. An application can be a DBus-activated service just fine without using KDBusAddons. Moreover, this new module uses named arguments for future-proofing, and adds support for specifying a `SystemdService`. It also cleans up the confusion on what the "path" is about: Rather than requiring to specify executable and path separately, we just extract the executable file name on Windows, if necessary. Usage: ``` ecm_generate_dbus_service_file(NAME org.kde.kded5 EXECUTABLE ${KDE_INSTALL_FULL_BINDIR}/kded5 SYSTEMD_SERVICE plasma-kded) ``` Test Plan: * Was able to generate a kded service file * Was able to generate a kded service file with `SystemdUnit` * Verified that it moaned when executable wasn't an absolute path * Untested on Windwos Reviewers: #frameworks, davidedmundson, kossebau, kfunk, habacker Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D29051
2020-07-10Introduce function ecm_install_configured_fileDavid Edmundson
Summary: This, as the name suggests, configures a file and installs it. It's not very complicated but it's a repeated pattern in plasma that gets quite messy dealing with temporary files. Test Plan: Used in a project Reviewers: #build_system Subscribers: apol, kossebau, pino, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D28355
2020-06-14extra-cmake-modules: Convert to SPDX license statementsAndreas Cord-Landwehr
2020-04-05ECM: attempt to fix KDEInstallDirsTest.relative_or_absolute on WindowsDavid Faure
Summary: Not passing CMAKE_INSTALL_PREFIX is a weird thing to do. The test shows "Installing in ." and some values like KDE_INSTALL_FULL_EXECROOTDIR become "/" which is considered relative on Windows. The test that passes /usr to CMAKE_INSTALL_PREFIX actually passes on Windows. Pass /tmp to the other test, remove the test without prefix. Test Plan: Passes on Linux, not tested on Windows, CI will do that Reviewers: kossebau, apol, cgiboudeaux Reviewed By: apol Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D28409
2020-03-24ECMPoQmToolsTest: have separate moc files for tr_thread_test 1 & 2v5.69.0-rc1v5.69.0Friedrich W. H. Kossebau
Reviewers: #frameworks, #build_system, dfaure Reviewed By: dfaure Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D28253
2020-02-11Add ecm_qt_install_logging_categories & ecm_qt_export_logging_categoryFriedrich W. H. Kossebau
Summary: Having to manually maintain a separate copy of all the data about qt logging categories in the categories files comes with the usual disadvantages. The new macro ecm_qt_install_logging_categories together with the additions of arguments DESCRIPTION & EXPORT to ecm_qt_declare_logging_category allows to have just one place with one copy of the data, and have the categories file automatically generated from that data, linked via the EXPORT id. For cases not using ecm_qt_declare_logging_category, but having categories manually defined in code, yet wanting to have info about those categories in the installed fiel, ecm_qt_export_logging_category allows to add those data to the system. Test Plan: Added unit tests work, porting of some repos created categories files whose diff against the manually created files were only the DO_NOT_EDIT header. Reviewers: #build_system, #frameworks, broulik, mlaurent Reviewed By: mlaurent Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D27150
2019-12-05EBN extra-cmake-modules comments spelling cleanupJohn Hayes
Summary: Correct spelling in extra-cmake-modules comments. Reviewers: apol Reviewed By: apol Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D25752
2019-11-30Fix EcmGenerateExportHeader tests on WindowsDavid Redondo
Summary: -weXXXX errors on warning XXXX. C4996 warns on deprecated declarations. Test Plan: Tests pass. Reviewers: kossebau, #windows, #frameworks Reviewed By: kossebau Subscribers: kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D25626
2019-11-04Fix ECMSetupVersion tests for old policy with project() wo/ VERSIONFriedrich W. H. Kossebau
With min required cmake version now bumped to 3.5, the policy for CMP0048 needs to be set explicitly to old now to prepare what the tests check. Fixup for 5ca01895e3c50322f79feeef5054d7f28b164d68
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-10-30ECMGenerateExportHeader: allow ecm_[..]_format_version wo/ CURRENT_VERSIONv5.64.0-rc1v5.64.0Friedrich W. H. Kossebau
GIT_SILENT
2019-10-22Raise CMake requirements to 3.5Hannah von Reth
2019-10-10Add ECMGenerateExportHeader, for improved handling of deprecated APIFriedrich W. H. Kossebau
Summary: Generates additional macros in the export header which can be used for fine-grained disabling of warnings & visibility as well as excluding from the build. Reviewers: #frameworks, #build_system Subscribers: chehrlic, dfaure, cgiboudeaux, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D23789
2019-03-05ECMGeneratePkgConfigFile: make all vars dependent on ${prefix}David Faure
Summary: Note that the first test had a comment "without optional arguments" so I removed the INCLUDE_INSTALL_DIR variable to test what happens by default. The other tests still pass an absolute path there (which is unusual in practice, and breaks the idea of using ${prefix}). Test Plan: `ctest -R PkgConfig` passes Reviewers: kossebau, apol, cgiboudeaux Reviewed By: apol Subscribers: kde-frameworks-devel, kde-buildsystem, fazevedo Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D19538
2019-03-04ECMGeneratePkgConfigFile: add variables used by pkg_check_modulesDavid Faure
Summary: If we ever end up in a situation where the generated .pc file is actually used by cmake's pkg_check_modules, then we need the includedir and libdir variables; pkg_check_modules ignores the Makefile-like Libs and Cflags lines of the .pc file. Context: craft adds a cmake buildsystem for sqlite3, which is then found using pkgconfig in akonadi. Test Plan: Filipe Azevedo is doing all the testing, I'm just providing patches :) Reviewers: apol, fazevedo, cgiboudeaux Reviewed By: fazevedo, cgiboudeaux Subscribers: cgiboudeaux, fazevedo, kde-buildsystem, kde-frameworks-devel Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D19506
2019-02-09Fix destroying QThread while still running -> warning -> crashDavid Faure
2019-01-09Use more https in linksFriedrich W. H. Kossebau
2018-09-12autotests: actually iterate over the list, rather than checking item 0 all ↵David Faure
the time Found while grepping for examples of foreach(... RANGE ...) for my cmake training material ;-)
2018-09-12Actually iterate over CF_GENERATED, rather than checking item 0 all the timeDavid Faure
Found while grepping for examples of foreach(... RANGE ...) for my cmake training material ;-)
2018-09-07Fix minor EBN issuesYuri Chornoivan
2018-07-08Improve ECMAddAppIconMacro.Dominik Schmidt
Summary: - Add support for SIDEBAR_ICONS on macOS - Allow specifying a basename for the icon file via OUTFILE_BASENAME - Add support for HiRes icons on Windows via icotool I'm sorry this went all into one big change. I see that it's not optimal, but it's really hard to rip it apart... Also to me the whole code with support for two flavors of png2ico and icotool seems very spaghetti-ish. IMHO there's no good reason to keep supporting all three, icotool is the only maintained project and the only one supporting more than 128px wide icons. That's why I would suggest to simplify the whole code by only supporting icotool in one of the next releases. Test Plan: We use this version of ECMAddAppIconMacro in ownCloud client and it works... I tested icotool natively and while cross-compiling on linux. SIDEBAR_ICONS are also working... If you want to test this with the ownCloud client, it's best to use https://github.com/dschmidt/owncloud-client/tree/fix-app-icon-macro because that contains a small fix I just PR'ed and which is not in master yet. (We maintain a fork of the module there, so compiling it for Windows or macOS will automatically use the version of the module that I'm submitting) Reviewers: vonreth, vpinon, apol, alexmerry, cgiboudeaux Reviewed By: cgiboudeaux Subscribers: cgiboudeaux, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D13698
2018-06-26[ECMGenerateHeaders] Add option for other header file extension than .hFriedrich W. H. Kossebau
Summary: Quite some C++-based projects do not use .h as header file extension, but .hpp, .hxx or other variants. Making the header file extension configurable enables to make use of ECMGenerateHeaders in such projects. Test Plan: The added unit test works, existing unit tests work as before. Also using in project with .hpp files works. Reviewers: apol Reviewed By: apol Subscribers: apol, kde-frameworks-devel, kde-buildsystem Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D13721
2018-01-28ECMToolchainAndroidTest doesn't exist anymoreAleix Pol
BUG: 389519
2018-01-17Fall back to language name for translations lookup if locale name failsWolfgang Bauer
For locales like de_AT, the current code only looks in share/locale/de_AT/ and share/locale/de-AT/ for translation catalogs, but not in share/locale/de/ where they most likely are. That's because bcp47Name() returns "de-AT" for de_AT (though in the case of de_DE e.g. it does return "de"). This patch additionally tries to fall back to the general language by taking the part of the locale name before the first '_'. Differential Revision: https://phabricator.kde.org/D9793
2017-12-20Use readelf to find project dependenciesv5.42.0-rc1v5.42.0Aleix Pol
Summary: We were using a link.txt file that cmake used to generate, on newer cmake versions it doesn't anymore. Instead use readelf, much like androiddeployqt does, to extract the depenencies. Catch: It relies on having all the binaries being at the same subdirectory, which is the default in ECM since not long ago. Test Plan: Build kirigamigallery with it Reviewers: #frameworks, #build_system, aacid Reviewed By: aacid Subscribers: mart Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D8173
2017-11-30Add the description tag to the generated pkgconfig filesv5.41.0-rc1v5.41.0Christophe Giboudeaux
Summary: pkgconfig complains when the .pc file doesn't have a description. eg: $ pkg-config Baloo Package 'Baloo' has no Description: field With this change, if the DESCRIPTION parameter is not used, ECM_GENERATE_PKGCONFIG_FILE will : - First look if there's a metainfo.yaml file and get the description from there - If the file doesn't exist, or if the description tag is empty or non-existent, create a description based on the LIB_NAME value Test Plan: Tests added & pass Reviewers: dfaure, apol Reviewed By: dfaure Subscribers: #frameworks, #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D9056
2017-08-10Forgot to add the testAleix Pol
2017-08-09Include a module for finding qml imports as runtime dependenciesAleix Pol
Summary: Allows to check if a module is available on the system and sets it as a runtime dependency. This is useful for projects so that they can specify their qml dependencies easily and packagers and developers get to see what's missing by looking at the cmake output. Reviewers: #build_system, #frameworks, sitter Reviewed By: sitter Subscribers: dfaure, aacid Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D7094
2017-07-31Make ECMPoQmToolsTest actually fail if a translation is wrongWolfgang Bauer
Currently the test still passed even if one of the check_translations() calls would fail. The reason is that check_translations() is a function which has its own scope, so if it sets "failed" the upper level doesn't see it. Use the PARENT_SCOPE option when setting the variable to properly propagate the value to the upper level. Differential Revision: https://phabricator.kde.org/D6701