diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-08-26 11:59:57 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-09-07 15:53:18 (GMT) |
commit | d1e5eb849704f73d646f64105d44807f3de50e48 (patch) | |
tree | 2246c9fd4e76d5f6eecdf42372d7c28adfc19b0a /Source/cmQtAutoGeneratorInitializer.h | |
parent | 25ac91a715ee5f21fd169c47d55e02234c00915f (diff) | |
download | CMake-d1e5eb849704f73d646f64105d44807f3de50e48.zip CMake-d1e5eb849704f73d646f64105d44807f3de50e48.tar.gz CMake-d1e5eb849704f73d646f64105d44807f3de50e48.tar.bz2 |
Autogen: Iterate source files only once
This is a large commit that serves multiple purposes
- Iterate source files only once and store all extracted
information in a cmQtAutogenDigest class that can be reused.
This is brings speed improvements because several properties
are only evaluated once. More that that it helps to avoid
duplication of code with non trivial files property checks.
- Fix the Visual Studio generator to use PRE_BUILD when possible.
- Convert `for( ... )` loops to C++11 range base loops where possible
(cmQtAutogen*.cxx only).
- String concatenation optimizations.
Diffstat (limited to 'Source/cmQtAutoGeneratorInitializer.h')
-rw-r--r-- | Source/cmQtAutoGeneratorInitializer.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/cmQtAutoGeneratorInitializer.h b/Source/cmQtAutoGeneratorInitializer.h index 48ae70e..1264ca5 100644 --- a/Source/cmQtAutoGeneratorInitializer.h +++ b/Source/cmQtAutoGeneratorInitializer.h @@ -4,16 +4,21 @@ #define cmQtAutoGeneratorInitializer_h #include "cmConfigure.h" // IWYU pragma: keep +#include "cmQtAutoGenDigest.h" + +#include <string> class cmGeneratorTarget; -class cmLocalGenerator; class cmQtAutoGeneratorInitializer { public: - static void InitializeAutogenTarget(cmLocalGenerator* localGen, - cmGeneratorTarget* target); - static void SetupAutoGenerateTarget(cmGeneratorTarget const* target); + static std::string GetQtMajorVersion(cmGeneratorTarget const* target); + static std::string GetQtMinorVersion(cmGeneratorTarget const* target, + const std::string& qtVersionMajor); + + static void InitializeAutogenTarget(cmQtAutoGenDigest& digest); + static void SetupAutoGenerateTarget(cmQtAutoGenDigest const& digest); }; #endif |