Remove cmake warning about generating moc file
ClosedPublic

Authored by mlaurent on Dec 10 2017, 11:30 AM.

Details

Test Plan

compile kmail without cmake warning

Diff Detail

Repository
R237 KConfig
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mlaurent created this revision.Dec 10 2017, 11:30 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptDec 10 2017, 11:30 AM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
mlaurent requested review of this revision.Dec 10 2017, 11:30 AM
aacid added a subscriber: aacid.Dec 10 2017, 3:01 PM

Wasn't this fixed recently in ecm? Or does kconfig needs an extra fix in addition to the fix in ecm?

it's seems that it was not fixed as I updated my kde last friday afternoon.
and this morning I was this problem.

And if it's fixed we need to remove this 2 lines
So it seems there is still a code to remove.

apol added a subscriber: apol.Dec 10 2017, 11:54 PM

Can you confirm that it still compiles properly in the cases where the class generates signals/slots/properties?

In fact, kmail compiling properly doesn't say much to me.

mpyne added a subscriber: mpyne.Dec 11 2017, 3:03 AM

@aacid you might be thinking of my KI18n fix for ui*.h files in D9118, but I'm sure there's other examples.

I'll point out that Kevin looked at my patch as well and recommended something like set_source_files_properties(${_header} ...) instead as a more canonical way to accomplish this.

@apol do you have an example of class which generate signal/slot ?

For me ARG_GENERATE_MOC seems to be the case and by default it skips AUTOMOC

@apol do you have cmake >= 3.10 ?

dfaure added a comment.EditedDec 11 2017, 8:09 AM

@mlaurent Do you have qtbase commit b71b7461b0 ?

@dfaure yep I rebuild all qt5.10 so yep :)

@kfunk what do you think about it ? :)

kfunk accepted this revision.Dec 13 2017, 8:44 PM

Yes. Makes sense to me.

KF5ConfigMacros.cmake
98

Use set_source_files_properties(...) instead, cf. https://phabricator.kde.org/R249:6e3b7084356666cc7747ea83a3afea4647c2d48b

This revision is now accepted and ready to land.Dec 13 2017, 8:44 PM
mlaurent updated this revision to Diff 23882.Dec 14 2017, 6:14 AM
  • Use set_source_files_properties
This revision was automatically updated to reflect the committed changes.