Skip to content

Autogen: Compile `mocs_compilation.cpp` first

mocs_compilation.cpp easily takes a long time to compile when it contains multiple moc files. When it was appended like before we ran into the situation that all smaller sources were already compiled when mocs_compilation.cpp got compiled at last. In that case a single core was busy but all remaining cores stayed idle.

To optimize CPU core utilization we now prepend `mocs_compilation.cpp`
to the sources list instead of appending it.  This allows smaller source files
to get compiled *while* the long lasting `mocs_compilation.cpp` gets compiled.

Merge request reports