CMakeLists.txt: Append KF5 macros to CMAKE_AUTOMOC_MACRO_NAMES

Authored by flherne on Nov 22 2017, 2:15 PM.

Description

CMakeLists.txt: Append KF5 macros to CMAKE_AUTOMOC_MACRO_NAMES

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.

Ideally this should be done either in ECM or in each framework that
exports these macros, but this solves the problem for us in the
meantime.

Differential Revision: https://phabricator.kde.org/D8951

Details

Committed
flherneNov 23 2017, 11:44 AM
Differential Revision
D8951: CMakeLists.txt: Append KF5 macros to CMAKE_AUTOMOC_MACRO_NAMES
Parents
R32:967df1e875a7: cmake: Add a note why we're setting CMP0071
Branches
Unknown
Tags
Unknown