summaryrefslogtreecommitdiff
path: root/Source/cmQtAutoGenGlobalInitializer.h
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-05-22 12:09:31 +0200
committerSebastian Holtermann <sebholt@xwmw.org>2019-05-22 12:25:17 +0200
commit71d6a1455e402755023b509629971afd1ed98922 (patch)
tree7c29c0201927d7a6d5c35b149721fd59c430abf9 /Source/cmQtAutoGenGlobalInitializer.h
parent0bf53483295a4b7de358e8b85ad44866d89633c5 (diff)
downloadcmake-71d6a1455e402755023b509629971afd1ed98922.tar.gz
Autogen: Evaluate compiler features for the same exectuable only once
To speed up the `AUTOGEN` configuration process, evaluate the compiler features only once. The feature evaluation result is stored in the new class `cmQtAutoGen::CompilerFeatures`, and the instance is shared by using `std::shared_ptr`.
Diffstat (limited to 'Source/cmQtAutoGenGlobalInitializer.h')
-rw-r--r--Source/cmQtAutoGenGlobalInitializer.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/Source/cmQtAutoGenGlobalInitializer.h b/Source/cmQtAutoGenGlobalInitializer.h
index 77429b7cbc..d56153ab7a 100644
--- a/Source/cmQtAutoGenGlobalInitializer.h
+++ b/Source/cmQtAutoGenGlobalInitializer.h
@@ -5,6 +5,8 @@
#include "cmConfigure.h" // IWYU pragma: keep
+#include "cmQtAutoGen.h"
+
#include <map>
#include <memory> // IWYU pragma: keep
#include <string>
@@ -68,15 +70,16 @@ private:
void AddToGlobalAutoRcc(cmLocalGenerator* localGen,
std::string const& targetName);
- bool GetExecutableTestOutput(std::string const& generator,
- std::string const& executable,
- std::string& error, std::string* output);
+ cmQtAutoGen::CompilerFeaturesHandle GetCompilerFeatures(
+ std::string const& generator, std::string const& executable,
+ std::string& error);
private:
std::vector<std::unique_ptr<cmQtAutoGenInitializer>> Initializers_;
std::map<cmLocalGenerator*, std::string> GlobalAutoGenTargets_;
std::map<cmLocalGenerator*, std::string> GlobalAutoRccTargets_;
- std::unordered_map<std::string, std::string> ExecutableTestOutputs_;
+ std::unordered_map<std::string, cmQtAutoGen::CompilerFeaturesHandle>
+ CompilerFeatures_;
Keywords const Keywords_;
};