<table><tr><td style="">mpyne added a comment.
</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/D9334" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>In fact this appears to force files containing <tt style="background: #ebebeb; font-size: 13px;">K_PLUGIN_FACTORY*</tt> into being evaluated by CMake's AUTOMOC (other warning fixes removed files from consideration by CMake AUTOMOC).</p>
<p>CMake itself appears to have had an interface change for AUTOMOC between 3.8 and 3.9+.</p>
<p>In particular, <a href="https://cmake.org/cmake/help/v3.8/manual/cmake-qt.7.html#automoc" class="remarkup-link" target="_blank" rel="noreferrer">https://cmake.org/cmake/help/v3.8/manual/cmake-qt.7.html#automoc</a></p>
<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>If the macro is found in a C++ implementation file, the moc output will be put into a file named according to <basename>.moc, following the Qt conventions. The moc file may be included by the user in the C++ implementation file with a preprocessor #include. If it is not so included, it will be added to a separate file which is compiled into the target.</p></blockquote>
<p>vs. <a href="https://cmake.org/cmake/help/v3.9/manual/cmake-qt.7.html#automoc" class="remarkup-link" target="_blank" rel="noreferrer">https://cmake.org/cmake/help/v3.9/manual/cmake-qt.7.html#automoc</a></p>
<blockquote style="border-left: 3px solid #a7b5bf; color: #464c5c; font-style: italic; margin: 4px 0 12px 0; padding: 4px 12px; background-color: #f8f9fc;"><p>If the macro is found in a C++ implementation file, the moc output will be put into a file named according to <basename>.moc, following the Qt conventions. The <basename>.moc must be included by the user in the C++ implementation file with a preprocessor #include.</p></blockquote>
<p>I'm not sure what the right answer is, or whether <tt style="background: #ebebeb; font-size: 13px;">K_PLUGIN_FACTORY</tt> needs its output to be run through <tt style="background: #ebebeb; font-size: 13px;">moc</tt> but if we do need <tt style="background: #ebebeb; font-size: 13px;">moc</tt> to run then I'm not sure what's the best way to address the CMake behavior change for .cpp files.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R244 KCoreAddons</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D9334" rel="noreferrer">https://phabricator.kde.org/D9334</a></div></div><br /><div><strong>To: </strong>mlaurent, dfaure<br /><strong>Cc: </strong>mpyne, ngraham, Frameworks<br /></div>