aboutsummaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
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
2017-07-05Stabilize ECMQtDeclareLoggingCategoryTestKevin Funk
2017-06-05New: ECMAddQch, for generating qch & doxygen tag filesFriedrich W. H. Kossebau
Summary: Enables generation of QCH files during a normal build, for documenting the public API of a library. These macros are especially done with release builds in mind, so distributed packages (like from Linux distributions) can include QCH files matching the version of the library and will be also automatically updated on new versions of the libary. Next to that these macros also support linking between different QCH files, so a subclass from another library for which there also is a QCH file installed will be linked to the entry in that other QCH file. This inter-QCH linking is especially useful for libraries extending Qt, where many of the used types are from Qt libraries. The macros come with the needed information for Qt libraries prepared, so the used Qt libraries just need to be listed in the LINK_QCHS argument by target names, like Qt5Core_QCH or Qt5Widgets_QCH. This should be a nice supplement to online services like api.kde.org, like Qt's own QCH files are to doc.qt.io, While QCH files from an abstract POV could be seen similar to code libraries, being components with links to lookup symbols/entries in other QCH files, so the rules and code should be done with similar concepts, currently CMake's target system seems bound to executable code creation. So things like "file(EXPORT ...)" could sadly not be reused, as custom targets are not supported with that. Thus a custom macro had to be created for now. Also could I not find a way to use namespaces like KF5::, for more consistent target naming. The patch also adds two variables to KDEInstallDirs.cmake for controlling where the QCH (and respective doxygen tag files) are installed. The QTQCHDIR variant allows to install QCH files for Qt-extending libraries into the same folder where Qt's own QCH files are, so Qt Assistant & other QCH viewer pick up them automatically to add them to the default help file collection. The QCHDIR variant would provide a neutral, but central installation location. Neutral, as it never "pollutes" the Qt system dirs with files possibly unrelated to Qt-based development (e.g. when simply using qthelp tools for documentation), and central, to help with finding available QCH files for manually adding/loading them into a viewer, given there is no official way currently to register the availability of QCH files on installing. Open questions: a) target system for exporting/importing done in a sane way? Better name pattern for the QCH targets than xxx_QCH (see the targets created for Qt, like Qt5Core_QCH)? b) sharing metadata with kapidox Initially I placed these macros into the kapidox module, as this seems the logic place. And would match what kdoctools does for user manuals. Just, that would create a build dependency on kapidox which complicates usage a little. Having these macros in ECM delivers them with no extra effort needed. The data in metainfo.yaml is partially duplicated with the data feed into the macros. How to deduplicate that is still open. Especially with the need to not depend on external data sources like identify.kde.org. Issues: * doxygen versions before 1.8.13 are broken and miss to include some files with generated QCH (https://bugzilla.gnome.org/show_bug.cgi?id=773693) * Qt Assistant often only built with QTextBrowser, while doxygen uses lots of HTML5 (incl. hardcoded JavaScript) (https://bugzilla.gnome.org/show_bug.cgi?id=773715), needs e.g. distributions to use QtWebKit to work, upcoming Qt versions might soon also have QtWebEngine based help viewer (https://codereview.qt-project.org/#/c/111559/) * inter-QCH links do not work in KDevelop currently (see https://bugs.kde.org/show_bug.cgi?id=372747) if installed as separate QCH files More details/background info at https://frinring.wordpress.com/2016/09/27/adding-api-dox-generation-to-the-build-by-cmake-macros/ Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D2854
2017-06-04tests: improve error reporting for ECMAddAppIconTestPino Toscano
when checking whether there were new sources added (on Windows and Mac), check whether the variable is empty as list, instead of failing because of a cmake syntax error
2017-06-04tests: fix output directory for KDEFetchTranslationsPino Toscano
hopefully the dummy executable will be where expected (on Windows)
2017-06-04tests: fix last change on KDEFetchTranslationsPino Toscano
include the ECMMarkNonGuiExecutable module, so the ecm_mark_nongui_executable can be used
2017-06-04tests: hopefully fix KDEFetchTranslations on WindowsPino Toscano
use ecm_mark_nongui_executable to mark the dummy executable as non-gui, so its linking works
2017-06-04Fix KDEInstallDirsTest.relative_or_absolute_usr, avoid Qt paths being usedFriedrich W. H. Kossebau
Set KDE_INSTALL_USE_QT_SYS_PATHS explicitely to FALSE, to avoid it defaulting to TRUE if Qt is also installed to the /usr prefix
2017-05-07Fix test when compiling from a tarballv5.34.0-rc3v5.34.0Aleix Pol
Summary: Otherwise it doesn't work when falling back to the project name. Test Plan: Ran the test locally with and without .git directory Reviewers: #frameworks, joselema, sitter Reviewed By: sitter Subscribers: #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D5741
2017-04-10Add a test for _repository_name() a function added for fetch-translationsAleix Pol
Summary: It turns out it's more complex than it looks, it's always better to have tests. Reviewers: sitter, aacid Reviewed By: sitter Subscribers: #frameworks, #build_system Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D5352
2017-02-05Revert "Automatically mark classes with pure virtual functions as /Abstract/."Stephen Kelly
With some combination of PyQt/compiler this breaks the build of kcoreaddons. This reverts commit 2e20aeab6e86670a66ff99a7b79120c4004b4d22.
2017-02-04Automatically mark classes with pure virtual functions as /Abstract/.Shaheed Haque
2017-02-04Bindings: Take account of visibility of classesShaheed Haque
2017-02-04Bindings: Take account of visibility attribute on APIsShaheed Haque
Don't export API which has visibility "hidden". Visibility attributes on variables are ignored, but call the generic method anyway. Remove checks for macros which obscure the attributes. Processing the attribute directly means that is not needed.
2017-01-18Bindings: Test file in subdirectory.Stephen Kelly
2017-01-18Bindings: Handle const-ref of non-record parameter defaultsStephen Kelly
2017-01-18Bindings: Handle const-ref parameters with {} initializerStephen Kelly
2017-01-18Bindings: Handle parameter initializers using {} gracefullyStephen Kelly
2017-01-18Bindings: Add explicit handling of nullptr as a parameter defaultStephen Kelly
Don't prepend a namespace to it as we do otherwise with enum/flags.
2017-01-15Bindings: Skip implementations of inline methods while parsingStephen Kelly
Don't process the same function name twice.
2017-01-15Bindings: Fix handling of forward declarationsStephen Kelly
It is not appropriate to decorate each forward declaration with the SIP attribute /External/. That is only needed for forward declarations of types which are defined in a different module. Local forward declarations can be omitted from the sip code. In sip code, a forward declaration followed later by a full class definition is an error. Omit forward declarations unless they are decorated with the external attribute. Introduce a rules database for consumers to decorate them with the attribute as required.
2017-01-15Bindings: Use lists in function API instead of stringsStephen Kelly
Custom rules should be able to deal with lists in these cases. This is already the case for function parameters.
2017-01-15Bindings: Add missing test function implementationStephen Kelly
2017-01-13Bindings: Add rules engine for typedefsStephen Kelly
Currently this is rather simple, allowing only matching typedefs by name. If we need more later, we can extend the interface. This will make it possible to add bindings for the K18n framework.
2017-01-13Bindings: Implement ModuleCode and MethodCode databasesStephen Kelly
2017-01-10Bindings: Correctly handle access specifiers within macrosStephen Kelly
The Q_DECLARE_TR_FUNCTIONS macro contains a `public:` access specifier, but the sip_generator just pastes the entire macro name. Adjust the generator to extract the correct access specifier.
2017-01-09Extend unit test with code similar to kguiaddonsStephen Kelly
2017-01-05Bindings: Add some content to the test sourceStephen Kelly
Increase test coverage regarding transformations.
2017-01-05Skip attributes on enums when generating bindingsShaheed Haque
2016-11-07Skip Python bindings test if PyQt isn't installedDavid Faure
2016-11-07Only add the test if python is foundStephen Kelly
2016-11-07Reduce the CMake minimum requiredStephen Kelly
This works with 3.2, and I don't remember why I made it 3.3.
2016-11-07Add missing includesStephen Kelly
Don't rely on transitive inclusion
2016-10-31Don't require the python bindings dependencies for ECMStephen Kelly
It should be optional.
2016-10-31Add the PythonModuleGeneration moduleStephen Kelly
This can be used by KF5 libraries to generate python 2 and 3 bindings.
2016-08-31add full license textAllen Winter
REVIEW: 128780
2016-06-15Integrate relative library paths to APKv5.24.0-rc1v5.24.0Andreas Cord-Landwehr
Needed for many unit tests to add them to APK files. REVIEW: 128175
2016-01-31Add test for ECMAddAppIcon.v5.19.0-rc1v5.19.0Gleb Popov
REVIEW: 126711
2015-12-29Make the KAppTemplate CMake module globalv5.18.0-rc1v5.18.0Marco Martin
templates are very useful as teaching tool in order to make a minimal application that uses a certain framework. templates in the KAppTemplate repository will always get forgotten (plus kapptemplate is not really necessary as they work in kdevelop as well) An ideal situation would be frameworks having templates in their own repos with templates of barebone apps using the main framework features. In order to do that, the cmake stuff needed in order to correctly install a template needs to be ported to a place avaiable to all frameworks REVIEW:126185