CMakeLists.txt: Append KF5 macros to CMAKE_AUTOMOC_MACRO_NAMES
ClosedPublic

Authored by flherne on Nov 22 2017, 3:11 PM.

Details

Summary

CMake 3.9 introduced bogus automoc warnings of the form:

"The file includes the moc file "foo.moc", but does not contain a Q_OBJECT, Q_GADGET or Q_NAMESPACE macro."

These are caused by use of KF5-provided macros that it doesn't recognise, and obscure the real compiler output.

CMake 3.10+ can be told extra macros to accept, which avoids the warnings.

Test Plan

Builds using CMake 3.10, with reduced warning spam.

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
flherne created this revision.Nov 22 2017, 3:11 PM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptNov 22 2017, 3:11 PM
apol added a subscriber: apol.Nov 22 2017, 3:15 PM

This should go to ECM.

kfunk accepted this revision.Nov 22 2017, 3:40 PM
kfunk added a subscriber: kfunk.

LGTM.

@apol Yes. Ideally this should go to ECM; but we also need a fix for KDevelop using older ECM.

CMakeLists.txt
14

CMAKE_VERSION (without ${}) is enough

This revision is now accepted and ready to land.Nov 22 2017, 3:40 PM
This revision was automatically updated to reflect the committed changes.