[cmake-developers] Faster automoc with parallel processing?
Alexander Neundorf
neundorf at kde.org
Mon Jun 18 15:58:28 EDT 2012
On Sunday 17 June 2012, Thomas Sondergaard wrote:
> Hi,
>
> I've tested the new automoc feature and it certainly makes the
> developers life simpler and the CMakeLists.txt a lot simpler. Thanks for
> that, it is a great improvement.
>
> On Windows with MSVC 2010 Generator, moc seems to be very slow and it is
> a paint to see it run sequentially. Could automoc be taught to do this
> in parallel using all the cores on the machine?
is "certainly" good enough as an answer ? ;-)
The thing is, for each target there is an accompanying automoc target. So if
you have 4 cores, and 4 targets are built in parallel, then also 4 (auto)mocs
should be running in parallel.
If you have only 1 target, consisting of many files, only 1 automoc target
will be executed, processing one moc after the other.
Parallelizing this is not obvious. Simply running as many mocs on a machine as
it has cores might lead to 16 mocs running on 4 cores (for 4 different
targets).
So, it is possible, it is some implementation work, and I'm not clear on how
to do the logic.
Do you have some ideas how to do this in a good way ?
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20120618/ab773b94/attachment.html>
More information about the cmake-developers
mailing list