diff --git a/Source/cmGlobalGeneratorFactory.h b/Source/cmGlobalGeneratorFactory.h index 67875197d07ff7ea7cf103aa4d4b73f75cde89c5..74d314538677f65db4f47f51ce47534dc6155189 100644 --- a/Source/cmGlobalGeneratorFactory.h +++ b/Source/cmGlobalGeneratorFactory.h @@ -41,6 +41,9 @@ public: /** Determine whether or not this generator supports toolsets */ virtual bool SupportsToolset() const = 0; + + /** Determine whether or not this generator supports platforms */ + virtual bool SupportsPlatform() const = 0; }; template <class T> @@ -71,6 +74,9 @@ public: /** Determine whether or not this generator supports toolsets */ bool SupportsToolset() const CM_OVERRIDE { return T::SupportsToolset(); } + + /** Determine whether or not this generator supports platforms */ + bool SupportsPlatform() const CM_OVERRIDE { return T::SupportsPlatform(); } }; #endif diff --git a/Source/cmGlobalGhsMultiGenerator.h b/Source/cmGlobalGhsMultiGenerator.h index 473d153b965c238f9e403199d0e31986c1963500..b2aac45a929ef0c0b58edf9fed0e329e65ee2f90 100644 --- a/Source/cmGlobalGhsMultiGenerator.h +++ b/Source/cmGlobalGhsMultiGenerator.h @@ -51,6 +51,12 @@ public: */ static bool SupportsToolset() { return false; } + /** + * Utilized by the generator factory to determine if this generator + * supports platforms. + */ + static bool SupportsPlatform() { return false; } + /** * Try to determine system information such as shared library * extension, pthreads, byte order etc. diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 69ec6cab89716e8da04d86acf17043d2983cecb9..c74973e17534dd9da9af9788bbbfcecb1b64bfc1 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -80,6 +80,12 @@ public: */ static bool SupportsToolset() { return false; } + /** + * Utilized by the generator factory to determine if this generator + * supports platforms. + */ + static bool SupportsPlatform() { return false; } + /** * Write a build statement to @a os with the @a comment using * the @a rule the list of @a outputs files and inputs. diff --git a/Source/cmGlobalUnixMakefileGenerator3.h b/Source/cmGlobalUnixMakefileGenerator3.h index 98969ff965dff76e48e06021fbbc184358fe2d70..ceb4140bfaece58a13693f2aa5f3955eb2191e12 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.h +++ b/Source/cmGlobalUnixMakefileGenerator3.h @@ -75,6 +75,12 @@ public: */ static bool SupportsToolset() { return false; } + /** + * Utilized by the generator factory to determine if this generator + * supports platforms. + */ + static bool SupportsPlatform() { return false; } + /** Get the documentation entry for this generator. */ static void GetDocumentation(cmDocumentationEntry& entry); diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index 2379266276af43c026bc729d3154a8cb801eebd3..c13c622f54b47a376f7eae36130d76f914ffe4b5 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -80,6 +80,7 @@ public: } bool SupportsToolset() const CM_OVERRIDE { return true; } + bool SupportsPlatform() const CM_OVERRIDE { return true; } }; cmGlobalGeneratorFactory* cmGlobalVisualStudio10Generator::NewFactory() diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index 106f1dd446f4a4d8dfd743104ae0575761416eef..1478a1775041c0c85ce6336442052f7df975b050 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -92,6 +92,7 @@ public: } bool SupportsToolset() const CM_OVERRIDE { return true; } + bool SupportsPlatform() const CM_OVERRIDE { return true; } }; cmGlobalGeneratorFactory* cmGlobalVisualStudio11Generator::NewFactory() diff --git a/Source/cmGlobalVisualStudio12Generator.cxx b/Source/cmGlobalVisualStudio12Generator.cxx index 2b32153b51f177da56ac36c63155e9bfe1435d19..3047171055ee50e14398731ea9b70eb75b628f71 100644 --- a/Source/cmGlobalVisualStudio12Generator.cxx +++ b/Source/cmGlobalVisualStudio12Generator.cxx @@ -74,6 +74,7 @@ public: } bool SupportsToolset() const CM_OVERRIDE { return true; } + bool SupportsPlatform() const CM_OVERRIDE { return true; } }; cmGlobalGeneratorFactory* cmGlobalVisualStudio12Generator::NewFactory() diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx index 920d995878ead7d90c2d5a44e0e24927a60e3e59..254682c892c59d2fee9d7137944f7d61e6498919 100644 --- a/Source/cmGlobalVisualStudio14Generator.cxx +++ b/Source/cmGlobalVisualStudio14Generator.cxx @@ -74,6 +74,7 @@ public: } bool SupportsToolset() const CM_OVERRIDE { return true; } + bool SupportsPlatform() const CM_OVERRIDE { return true; } }; cmGlobalGeneratorFactory* cmGlobalVisualStudio14Generator::NewFactory() diff --git a/Source/cmGlobalVisualStudio7Generator.h b/Source/cmGlobalVisualStudio7Generator.h index 2092343c094914fd3bc277b13429dd02c644da12..8a33ee0f7b63ccb503d988b575ff0908825051b9 100644 --- a/Source/cmGlobalVisualStudio7Generator.h +++ b/Source/cmGlobalVisualStudio7Generator.h @@ -47,6 +47,12 @@ public: */ static bool SupportsToolset() { return false; } + /** + * Utilized by the generator factory to determine if this generator + * supports platforms. + */ + static bool SupportsPlatform() { return false; } + /** * Try to determine system information such as shared library * extension, pthreads, byte order etc. diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index 3cade96283d8dceff64ba12771f504eea72c2301..2c0168e1be95e5c3c0b9b4e49eaecb86556fc759 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -83,6 +83,7 @@ public: } bool SupportsToolset() const CM_OVERRIDE { return false; } + bool SupportsPlatform() const CM_OVERRIDE { return true; } }; cmGlobalGeneratorFactory* cmGlobalVisualStudio8Generator::NewFactory() diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx index b65a5a93b61e6b3da309d703db98d4cb71d2574f..acc7baa6a1dabb7ef4e2452b78144d6e596e3daa 100644 --- a/Source/cmGlobalVisualStudio9Generator.cxx +++ b/Source/cmGlobalVisualStudio9Generator.cxx @@ -86,6 +86,7 @@ public: } bool SupportsToolset() const CM_OVERRIDE { return false; } + bool SupportsPlatform() const CM_OVERRIDE { return true; } }; cmGlobalGeneratorFactory* cmGlobalVisualStudio9Generator::NewFactory() diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 7b085d03de75f89b7453e3892d271d77e07ec2cd..23fad512a5b4bef7aa0c4c50309dfd1b95604892 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -122,6 +122,7 @@ public: } bool SupportsToolset() const CM_OVERRIDE { return true; } + bool SupportsPlatform() const CM_OVERRIDE { return false; } }; cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(cmake* cm, diff --git a/Source/cmake.cxx b/Source/cmake.cxx index c5976053ee1789e9b1b096a6a7f869b4897edb0c..fceec1692387b464254acbb7fd6d351ca61b90e7 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -853,6 +853,7 @@ void cmake::GetRegisteredGenerators(std::vector<GeneratorInfo>& generators) for (size_t j = 0; j < names.size(); ++j) { GeneratorInfo info; info.supportsToolset = (*i)->SupportsToolset(); + info.supportsPlatform = (*i)->SupportsPlatform(); info.name = names[j]; generators.push_back(info); } @@ -865,6 +866,7 @@ void cmake::GetRegisteredGenerators(std::vector<GeneratorInfo>& generators) GeneratorInfo info; info.name = i->first; info.supportsToolset = false; + info.supportsPlatform = false; generators.push_back(info); } } diff --git a/Source/cmake.h b/Source/cmake.h index 4a5376d99d13e5ab3b4281982897525afd2c8829..4ca2a80bace11b139f7e582a4029944f5635a787 100644 --- a/Source/cmake.h +++ b/Source/cmake.h @@ -104,6 +104,7 @@ public: { std::string name; bool supportsToolset; + bool supportsPlatform; }; typedef std::map<std::string, cmInstalledFile> InstalledFilesMap;