diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-04-02 16:53:34 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-04-02 18:11:50 (GMT) |
commit | 5431395d68a44d42149fb93692636f4138ddf6ed (patch) | |
tree | f858e3027430a48044a1e5f36b21437537565d79 /Source/cmQtAutoGenGlobalInitializer.h | |
parent | 78eccc7836e068652ea772ec65614bc446f23b14 (diff) | |
download | CMake-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.h | 15 |
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 |