D16032: Generate all kdebugsettings .categories files automatically

Friedrich W. H. Kossebau noreply at phabricator.kde.org
Mon Oct 8 12:47:04 BST 2018


kossebau added a comment.


  Initial commit message also had:
  "The EXPORT argument is kept explicit for now, though it could be considered to
  hardcode the related install_qt_logging_categories() calls into the two
  macros."
  
  So much for quick thoughts in tired mode while writing the commit message. Actually this will not work.
  Reason is that the macros are all run at cmake/configure time, and . And depend on the order they are executed. So first all declare_plugin_qt_logging_category calls have to be made to add the data to the target object, before the macro install_qt_logging_categories is run, as that one will generate the final file and use only the data existing with the target at that time.

INLINE COMMENTS

> apol wrote in CMakeLists.txt:5
> I find it odd that we're creating a macro to reduce the redundant parts but in practice not end up reducing much.
> 
> I would suggest also having the target as the argument rather than the output variable. It will make it easier to see the 1:1 relationship and also make it possible to use the target name as the basename.

One cannot see all the reduction directly from the diff for the plugins, as here we are jumping directly to generated installed categories file.
But see the diffs for the kdevplatforms libs, there it should be more clear to see how much there is reduced (and as wanted side-effect consistency is ensured).

Not sure what you mean by "having the target as the argument"? And "use the target name as the basename"?

The main purpose of the macros "declare*_qt_logging_category" is still to generate the debug source files. Collecting the data so that we can autogenerate the installed categories file for those who want to use kdebugsettings is a 2nd-order purpose.

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D16032

To: kossebau, #kdevelop
Cc: apol, kdevelop-devel, glebaccon, antismap, iodelay, vbspam, geetamc, Pilzschaf, akshaydeo, surgenight, arrowd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20181008/b14631f1/attachment.html>


More information about the KDevelop-devel mailing list