summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenInitializer.h
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-01-17 10:19:42 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-01-18 12:47:23 (GMT)
commit1ed4d48dcf71df4e8a352bc476262a79d75e299a (patch)
tree6fa8ea9ab297775adbaa307349e0a86a80a95f1d /Source/cmQtAutoGenInitializer.h
parenta42b700cc254e284892821dea06ac265744a0939 (diff)
downloadCMake-1ed4d48dcf71df4e8a352bc476262a79d75e299a.zip
CMake-1ed4d48dcf71df4e8a352bc476262a79d75e299a.tar.gz
CMake-1ed4d48dcf71df4e8a352bc476262a79d75e299a.tar.bz2
Autogen: Prepend instead of append `mocs_compilation.cpp` to the sources list
`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. Closes #18793
Diffstat (limited to 'Source/cmQtAutoGenInitializer.h')
-rw-r--r--Source/cmQtAutoGenInitializer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/cmQtAutoGenInitializer.h b/Source/cmQtAutoGenInitializer.h
index 47f157c..eefbaf0 100644
--- a/Source/cmQtAutoGenInitializer.h
+++ b/Source/cmQtAutoGenInitializer.h
@@ -102,7 +102,8 @@ private:
bool SetupWriteAutogenInfo();
bool SetupWriteRccInfo();
- void AddGeneratedSource(std::string const& filename, GeneratorT genType);
+ void AddGeneratedSource(std::string const& filename, GeneratorT genType,
+ bool prepend = false);
bool GetMocExecutable();
bool GetUicExecutable();