summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenGlobalInitializer.h
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2018-11-06 11:40:48 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2018-11-11 13:28:55 (GMT)
commit3baa817c34a673025ccfeceb87a7c1f870fbae75 (patch)
treef0c63c46e45f88ef38bb23adfd4d3fcd7969fb4a /Source/cmQtAutoGenGlobalInitializer.h
parent3327d3bb20c2a4505648b59d72cfaada38e1ee93 (diff)
downloadCMake-3baa817c34a673025ccfeceb87a7c1f870fbae75.zip
CMake-3baa817c34a673025ccfeceb87a7c1f870fbae75.tar.gz
CMake-3baa817c34a673025ccfeceb87a7c1f870fbae75.tar.bz2
Autogen: Add support for global ``autogen`` and ``autorcc`` targets
This teaches CMake the variables - CMAKE_GLOBAL_AUTOGEN_TARGET - CMAKE_GLOBAL_AUTOGEN_TARGET_NAME - CMAKE_GLOBAL_AUTORCC_TARGET - CMAKE_GLOBAL_AUTORCC_TARGET_NAME which control the generation of global ``autogen`` and ``autorcc`` targets. Closes #17721
Diffstat (limited to 'Source/cmQtAutoGenGlobalInitializer.h')
-rw-r--r--Source/cmQtAutoGenGlobalInitializer.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/Source/cmQtAutoGenGlobalInitializer.h b/Source/cmQtAutoGenGlobalInitializer.h
index 42bf62f..9e6bac0 100644
--- a/Source/cmQtAutoGenGlobalInitializer.h
+++ b/Source/cmQtAutoGenGlobalInitializer.h
@@ -5,7 +5,9 @@
#include "cmConfigure.h" // IWYU pragma: keep
-#include <memory>
+#include <map>
+#include <memory> // IWYU pragma: keep
+#include <string>
#include <vector>
class cmLocalGenerator;
@@ -22,11 +24,24 @@ public:
bool generate();
private:
+ friend class cmQtAutoGenInitializer;
+
bool InitializeCustomTargets();
bool SetupCustomTargets();
+ void GetOrCreateGlobalTarget(cmLocalGenerator* localGen,
+ std::string const& name,
+ std::string const& comment);
+
+ void AddToGlobalAutoGen(cmLocalGenerator* localGen,
+ std::string const& targetName);
+ void AddToGlobalAutoRcc(cmLocalGenerator* localGen,
+ std::string const& targetName);
+
private:
std::vector<std::unique_ptr<cmQtAutoGenInitializer>> Initializers_;
+ std::map<cmLocalGenerator*, std::string> GlobalAutoGenTargets_;
+ std::map<cmLocalGenerator*, std::string> GlobalAutoRccTargets_;
};
#endif