[Interest] Compile Speed Question regarding MOC
stephen.kelly at kdab.com
Tue Feb 18 23:28:17 CET 2014
On Tuesday, February 18, 2014 17:04:54 Michael Jackson wrote:
> I have what seems to be an obvious question/answer but the subtleties may
> not be what I think they are. We have a project with about 500 files most
> of which inherit from QObject or QWidget which means they all have moc run
> on them. Currently I have each moc created file compiled as a separate
> object which means for every class I have I am really compiling 2 files
> (.cpp and mocXXXX.cxx). The compile times are starting to get "up there" a
> bit and I was wondering what others do at this point? Do you simply do the
> #include "moc_MyClass.cxx" in the .cpp file of MyClass? Does that really
> help speed up the compile process? Before I go updating all of our source
> files I just wanted to get a quick sanity check for this course of action
> from the Qt community.
If you use CMake and AUTOMOC, the 'loose' moc files will be included in a
single file and compiled together (one per target).
Stephen Kelly <stephen.kelly at kdab.com> | Software Engineer
KDAB (Deutschland) GmbH & Co.KG, a KDAB Group Company
www.kdab.com || Germany +49-30-521325470 || Sweden (HQ) +46-563-540090
KDAB - Qt Experts - Platform-Independent Software Solutions
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: This is a digitally signed message part.
More information about the Interest