summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGeneratorFactory.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-01-18 15:13:55 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-18 17:29:53 (GMT)
commit818df52c488a94628169811bddffe05f36c68b42 (patch)
tree9beedc775cd16676f855334c0eba3b032abaa6cd /Source/cmGlobalGeneratorFactory.h
parent8144b00e32cf1e24daf41353cbcd1806311ceac9 (diff)
downloadCMake-818df52c488a94628169811bddffe05f36c68b42.zip
CMake-818df52c488a94628169811bddffe05f36c68b42.tar.gz
CMake-818df52c488a94628169811bddffe05f36c68b42.tar.bz2
Add global generator factory method to get list of known platforms
Add a `cmGlobalGeneratorFactory::GetKnownPlatforms` method to return a list of known possible values for `CMAKE_GENERATOR_PLATFORM`. Implement the method for each generator by referencing the list of possible values documented in `Help/generator/*.rst` for it. Co-Author: Julien Jomier <julien.jomier@kitware.com>
Diffstat (limited to 'Source/cmGlobalGeneratorFactory.h')
-rw-r--r--Source/cmGlobalGeneratorFactory.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmGlobalGeneratorFactory.h b/Source/cmGlobalGeneratorFactory.h
index 906ec9a..26c9545 100644
--- a/Source/cmGlobalGeneratorFactory.h
+++ b/Source/cmGlobalGeneratorFactory.h
@@ -38,6 +38,9 @@ public:
/** Determine whether or not this generator supports platforms */
virtual bool SupportsPlatform() const = 0;
+
+ /** Get the list of supported platforms name for this generator */
+ virtual std::vector<std::string> GetKnownPlatforms() const = 0;
};
template <class T>
@@ -77,6 +80,13 @@ public:
/** Determine whether or not this generator supports platforms */
bool SupportsPlatform() const override { return T::SupportsPlatform(); }
+
+ /** Get the list of supported platforms name for this generator */
+ std::vector<std::string> GetKnownPlatforms() const override
+ {
+ // default is no platform supported
+ return std::vector<std::string>();
+ }
};
#endif