aboutsummaryrefslogtreecommitdiff
path: root/modules/ECMQtDeclareLoggingCategory.cmake
AgeCommit message (Collapse)Author
2021-07-12Don't install logging categories files on AndroidVolker Krause
There is no KDebugSettings there, and thus those files just bloat the APK.
2021-05-29ecm_qt_declare_logging_category: catch alias targets before failing internallyFriedrich W. H. Kossebau
target_sources() as used internally does not take alias targets.
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-02-22ecm_qt_declare_logging_category: support target arg to append source file toFriedrich W. H. Kossebau
2021-01-31ECMQtDeclareLoggingCategory: fix typo in docuDavid Faure
GIT_SILENT
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-06-14extra-cmake-modules: Convert to SPDX license statementsAndreas Cord-Landwehr
2020-02-12ECMQtDeclareLoggingCategory: gently deal with no categories exportedFriedrich W. H. Kossebau
With some build configurations no catgories might be registered for a given export id. Instead of failing hard and thus forcing to catch this situation explicitly on the caller side, be grateful on the callee side and just generate an empty file, so the installed file set is consistent. GIT_SILENT
2020-02-11ECMQtDeclareLoggingCategory: use older NAME_WE with get_filename_componentFriedrich W. H. Kossebau
NAME_WLE might be more nice to support any people who might want to use a dot in the base filename, but that needs newer cmake. GIT_SILENT
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
2017-05-23ecm_qt_declare_logging_category(): more unique include guard for headerFriedrich W. H. Kossebau
Summary: The old guard was created just from the identifier + _H, which runs the chance to clash in projects which use an identifier matching the project name and which also have a class or central file header which is named by the project and then has an include guard matching the filename. Example: project ABC -> abc.h with ABC_H guard identifier ABC, header debug.h -> debug.h with ABC_H guard any.cpp including both abc.h and debug.h will see only one content Using both the header file name and identifier for the guard name and prefixing it additionally with a macro specific term should make the guard both follow the usual pattern for guards matching the file name and also add some namespacing to allow for similar named header files in bigger projects (e.g. "debug.h") which could be included in the same include tree. Reviewers: #frameworks, #build_system Subscribers: elvisangelaccio Tags: #frameworks, #build_system Differential Revision: https://phabricator.kde.org/D5866
2016-09-02The default level for logging categories should be Info rather than Warning.David Faure
The whole point of Info is to be used by apps who want to print out some info for the user, not disabled by default. Example use case: ksmserver could output the name of the autostart files it's starting, so user can check their own scripts are started, and associate any errors with the corresponding script. In other words: Debug = debugging for the developer Info = debugging for the user :-) This commit shows the benefit of having a central place for changing this (many category definitions do not use this macro though) REVIEW: 128232
2016-08-31add full license textAllen Winter
REVIEW: 128780
2016-04-03ecm_qt_declare_logging_category: improve error message when using without ↵David Faure
including If one subdir in the project includes this file, all others can use the function but they don't see the value of the variable, which leads to a strange error CMake Error at ECM/modules/ECMQtDeclareLoggingCategory.cmake:114 (configure_file): configure_file input location <srcdir> is a directory but a file was expected. Happened in KIO, with kio/gui doing include+function call, and then adding function call in kio/widgets. REVIEW: 127432
2016-03-20Revert "ECMQtDeclareLoggingCategory: Include <QDebug> with the generated file"Stephen Kelly
This reverts commit 1d4bc35cf9383177459544d6fcd9de35edf3e77d. QLoggingCategory has always included QDebug, so this has always been superfluous.
2015-12-21ECMQtDeclareLoggingCategory: Include <QDebug> with the generated fileMartin Klapetek
In order to use the logging categories created by ECM, the generated header file has to be included but then also #include <QDebug> must be added to make it usable at all for qCDebug/qCWarning stuff. So this puts the #include <QDebug> into the generated header file and thus allowing to include a single header for qCDebug/qCWarning instead of two. REVIEW: 126368
2015-08-18Add macro to generate logging category declarations for Qt5.Alex Merry
This makes life a bit easier for developers who use the categorised logging in Qt5 in the common case - rather than creating two new files, and remembering to put in the #ifdef for the default verbosity settings in Qt 5.4, they can just add a couple of lines to their CMakeLists.txt. REVIEW: 124595