diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2018-01-03 15:59:40 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2018-01-17 16:23:49 (GMT) |
commit | a008578deebfa71b38786281450e3d9cf84f5847 (patch) | |
tree | 70173006b0adc6a62626e59d9cc653826f950336 /Source/cmQtAutoGeneratorInitializer.h | |
parent | 488baaf0d6144cd7cedfbbd3bb6eadcc72257fc4 (diff) | |
download | CMake-a008578deebfa71b38786281450e3d9cf84f5847.zip CMake-a008578deebfa71b38786281450e3d9cf84f5847.tar.gz CMake-a008578deebfa71b38786281450e3d9cf84f5847.tar.bz2 |
Autogen: Process files concurrently in AUTOMOC and AUTOUIC
This introduces concurrent thread processing in the `_autogen`
target wich processes AUTOMOC and AUTOUIC.
Source file parsing is distributed among the threads by
using a job queue from which the threads pull new parse jobs.
Each thread might start an independent ``moc`` or ``uic`` process.
Altogether this roughly speeds up the AUTOMOC and AUTOUIC build
process by the number of physical CPUs on the host system.
The exact number of threads to start in the `_autogen` target
is controlled by the new AUTOGEN_PARALLEL target property which
is initialized by the new CMAKE_AUTOGEN_PARALLEL variable.
If AUTOGEN_PARALLEL is empty or unset (which is the default)
the thread count is set to the number of physical CPUs on
the host system.
The AUTOMOC/AUTOUIC generator and the AUTORCC generator are
refactored to use a libuv loop internally.
Closes #17422.
Diffstat (limited to 'Source/cmQtAutoGeneratorInitializer.h')
-rw-r--r-- | Source/cmQtAutoGeneratorInitializer.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.h b/Source/cmQtAutoGeneratorInitializer.h index e06e1c4..0567437 100644 --- a/Source/cmQtAutoGeneratorInitializer.h +++ b/Source/cmQtAutoGeneratorInitializer.h @@ -13,7 +13,8 @@ class cmGeneratorTarget; -class cmQtAutoGeneratorInitializer +/// @brief Initializes the QtAutoGen generators +class cmQtAutoGeneratorInitializer : public cmQtAutoGen { public: static std::string GetQtMajorVersion(cmGeneratorTarget const* target); @@ -55,11 +56,15 @@ private: void SetupCustomTargetsUic(); std::vector<std::string> AddGeneratedSource(std::string const& filename, - cmQtAutoGen::Generator genType); + GeneratorT genType); bool QtVersionGreaterOrEqual(unsigned long requestMajor, unsigned long requestMinor) const; + bool RccListInputs(std::string const& fileName, + std::vector<std::string>& files, + std::string& errorMessage); + private: cmGeneratorTarget* Target; bool MocEnabled; @@ -73,7 +78,7 @@ private: // Configurations std::string ConfigDefault; std::vector<std::string> ConfigsList; - cmQtAutoGen::MultiConfig MultiConfig; + MultiConfigT MultiConfig; // Names std::string AutogenTargetName; std::string AutogenFolder; |