summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenGlobalInitializer.h
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2019-04-02 16:53:34 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2019-04-02 18:11:50 (GMT)
commit5431395d68a44d42149fb93692636f4138ddf6ed (patch)
treef858e3027430a48044a1e5f36b21437537565d79 /Source/cmQtAutoGenGlobalInitializer.h
parent78eccc7836e068652ea772ec65614bc446f23b14 (diff)
downloadCMake-5431395d68a44d42149fb93692636f4138ddf6ed.zip
CMake-5431395d68a44d42149fb93692636f4138ddf6ed.tar.gz
CMake-5431395d68a44d42149fb93692636f4138ddf6ed.tar.bz2
Autogen: Add cmQtAutogenGlobalInitializer::Keywords class
The new `cmQtAutogenGlobalInitializer::Keywords` class instance is bound to the lifetime of the `cmQtAutogenGlobalInitializer` instance. Global static const strings would be allocated at program start and deallocated at program end. Keeping keyword strings alive only in the context where they're needed helps to reduce the memory footprint.
Diffstat (limited to 'Source/cmQtAutoGenGlobalInitializer.h')
-rw-r--r--Source/cmQtAutoGenGlobalInitializer.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/Source/cmQtAutoGenGlobalInitializer.h b/Source/cmQtAutoGenGlobalInitializer.h
index 74184a0..6cddf16 100644
--- a/Source/cmQtAutoGenGlobalInitializer.h
+++ b/Source/cmQtAutoGenGlobalInitializer.h
@@ -18,10 +18,24 @@ class cmQtAutoGenInitializer;
class cmQtAutoGenGlobalInitializer
{
public:
+ /// @brief Collection of QtAutogen related keywords
+ class Keywords
+ {
+ public:
+ Keywords();
+
+ std::string AUTOMOC;
+ std::string AUTOUIC;
+ std::string AUTORCC;
+ };
+
+public:
cmQtAutoGenGlobalInitializer(
std::vector<cmLocalGenerator*> const& localGenerators);
~cmQtAutoGenGlobalInitializer();
+ Keywords const* kw() const { return Keywords_.get(); };
+
bool generate();
private:
@@ -48,6 +62,7 @@ private:
std::map<cmLocalGenerator*, std::string> GlobalAutoGenTargets_;
std::map<cmLocalGenerator*, std::string> GlobalAutoRccTargets_;
std::unordered_map<std::string, std::string> ExecutableTestOutputs_;
+ std::unique_ptr<Keywords> Keywords_;
};
#endif