<table><tr><td style="">mpyne created this revision.<br />mpyne added reviewers: Frameworks, Build System, Localization.<br />Restricted Application added a project: Frameworks.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D9118" rel="noreferrer">View Revision</a></tr></table><br /><div><strong>REVISION SUMMARY</strong><div><p>CMake in 3.10.0 has started warning that <tt style="background: #ebebeb; font-size: 13px;">.h</tt> files which are automatically generated have historically been left out of AUTOMOC, and that future CMake releases will start including them in AUTOMOC.</p>

<p>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 <tt style="background: #ebebeb; font-size: 13px;">ui_*.h</tt> files do not create <tt style="background: #ebebeb; font-size: 13px;">QObject</tt>-based subclasses, it seems to me that matching historical behavior and skipping AUTOMOC is the proper decision.</p>

<p>The question is where in the CMake code to set that property.  The warnings I saw were generated for <tt style="background: #ebebeb; font-size: 13px;">*.h</tt> files created by uic.  This generation step is ultimately setup by the <tt style="background: #ebebeb; font-size: 13px;">ki18n_wrap_ui</tt> CMake macro from KI18n, so this seems like the right spot to flag the generated .h file as needing to skip AUTOMOC.</p></div></div><br /><div><strong>TEST PLAN</strong><div><p>KI18n builds and installs.<br />
My test app (JuK) now successfully builds and installs without the CMake warnings previously generated.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R249 KI18n</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D9118" rel="noreferrer">https://phabricator.kde.org/D9118</a></div></div><br /><div><strong>AFFECTED FILES</strong><div><div>cmake/KF5I18NMacros.cmake</div></div></div><br /><div><strong>To: </strong>mpyne, Frameworks, Build System, Localization<br /></div>