D9334: Remove cmake 3.10+ warning for users of K_PLUGIN_FACTORY and K_PLUGIN_FACTORY_WITH_JSON
Michael Pyne
noreply at phabricator.kde.org
Mon Dec 18 21:36:15 UTC 2017
mpyne added a comment.
In fact this appears to force files containing `K_PLUGIN_FACTORY*` into being evaluated by CMake's AUTOMOC (other warning fixes removed files from consideration by CMake AUTOMOC).
CMake itself appears to have had an interface change for AUTOMOC between 3.8 and 3.9+.
In particular, https://cmake.org/cmake/help/v3.8/manual/cmake-qt.7.html#automoc
> 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.
vs. https://cmake.org/cmake/help/v3.9/manual/cmake-qt.7.html#automoc
> 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.
I'm not sure what the right answer is, or whether `K_PLUGIN_FACTORY` needs its output to be run through `moc` but if we do need `moc` to run then I'm not sure what's the best way to address the CMake behavior change for .cpp files.
REPOSITORY
R244 KCoreAddons
REVISION DETAIL
https://phabricator.kde.org/D9334
To: mlaurent, dfaure
Cc: mpyne, ngraham, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20171218/d7684c16/attachment.html>
More information about the Kde-frameworks-devel
mailing list