Spawning multiple automoc's during build

Alexander Neundorf neundorf at kde.org
Tue Dec 6 17:03:27 UTC 2011


On Monday 05 December 2011, Valentin Rusu wrote:
> Hello,
> 
> While contemplating a kdelibs compilation, I realized that my "system
> load" plasmoid shows only one core is working, despite I set
> MAKEFLAGS=-j5 and I have a multi-core CPU. The konsole shows that .moc
> files were created dusring this time. Later on, cpp files compilation
> start using all the cores. So here is my question: are there any means
> to spawn several automoc's during build ?

Currently, no.
Each target depends on one automoc target.
What could be done theoretically is to start multiple moc instances at once 
from withint cmake -E automoc.

You can have a look at the sources if you are interested, it is in 
cmake/Sources/cmQtAutomoc.cxx.

Currently moc is executed sync and blocking.
There is support for running processes non-blocking in cmake, this would have 
to be used.

Since this is an optimization and no bug fix or missing feature it is quite at 
the end of my TODO list.

Alex


More information about the Kde-buildsystem mailing list