Generate a moc_predefs.h file for KIOCore
ClosedPublic

Authored by apol on Apr 6 2017, 12:47 PM.

Details

Summary

Otherwise moc gets through wrong files in some platforms that have weird
preprocessor hacks to support large files on 32 bits systems.
This should be done by automoc.

See:
https://gitlab.kitware.com/cmake/cmake/issues/16640
https://bugreports.qt.io/browse/QTBUG-57796

BUG: 371721

Test Plan

Fixes build of KIO on ARM32 (flatpak)

Diff Detail

Repository
R241 KIO
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
apol created this revision.Apr 6 2017, 12:47 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptApr 6 2017, 12:47 PM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
apol updated this revision to Diff 13150.Apr 6 2017, 1:38 PM

Address issues

apol updated this revision to Diff 13151.Apr 6 2017, 1:39 PM

Unused variable

apol edited the test plan for this revision. (Show Details)Apr 6 2017, 1:44 PM
apol added reviewers: Frameworks, dfaure, cgilles.
dfaure added inline comments.Apr 6 2017, 3:43 PM
src/core/CMakeLists.txt
165

Shouldn't that be a rule with dependencies, so that it's not executed at every run of cmake? Or maybe just "if moc_predefs.h doesn't exist then..."

apol updated this revision to Diff 13160.Apr 6 2017, 5:18 PM

Probably the smallest optimization ever. :)

dfaure accepted this revision.Apr 6 2017, 5:21 PM

Thanks. I don't agree that it was a small optimization, because regenerating a header file means recompiling all the files that include it, every single time. It's the job of a build system to make sure this doesn't happen, to save developer time ;)

This revision is now accepted and ready to land.Apr 6 2017, 5:21 PM
This revision was automatically updated to reflect the committed changes.