D9118: ki18n cmake macros: Mark UIC-generated .h files to skip AUTOMOC by default

Michael Pyne noreply at phabricator.kde.org
Sat Dec 2 22:00:16 UTC 2017


mpyne created this revision.
mpyne added reviewers: Frameworks, Build System, Localization.
Restricted Application added a project: Frameworks.

REVISION SUMMARY
  CMake in 3.10.0 has started warning that `.h` files which are automatically generated have historically been left out of AUTOMOC, and that future CMake releases will start including them in AUTOMOC.
  
  For now the warning can be squelched by either specifically opting in to future behavior (by setting policy CMP0071) or by manually marking the generated file as needing to skip AUTOMOC. Since the `ui_*.h` files do not create `QObject`-based subclasses, it seems to me that matching historical behavior and skipping AUTOMOC is the proper decision.
  
  The question is where in the CMake code to set that property.  The warnings I saw were generated for `*.h` files created by uic.  This generation step is ultimately setup by the `ki18n_wrap_ui` CMake macro from KI18n, so this seems like the right spot to flag the generated .h file as needing to skip AUTOMOC.

TEST PLAN
  KI18n builds and installs.
  My test app (JuK) now successfully builds and installs without the CMake warnings previously generated.

REPOSITORY
  R249 KI18n

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

AFFECTED FILES
  cmake/KF5I18NMacros.cmake

To: mpyne, #frameworks, #build_system, #localization
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20171202/bf03aef3/attachment.html>


More information about the Kde-buildsystem mailing list