diff --git a/Source/cmGlobalGeneratorFactory.h b/Source/cmGlobalGeneratorFactory.h index 05c84208e..9d8f7a085 100644 --- a/Source/cmGlobalGeneratorFactory.h +++ b/Source/cmGlobalGeneratorFactory.h @@ -33,6 +33,9 @@ public: /** Get the documentation entry for this factory */ virtual void GetDocumentation(cmDocumentationEntry& entry) const = 0; + + /** Get the names of the current registered generators */ + virtual void GetGenerators(std::vector& names) const = 0; }; template @@ -46,6 +49,10 @@ public: /** Get the documentation entry for this factory */ virtual void GetDocumentation(cmDocumentationEntry& entry) const { T().GetDocumentation(entry); } + + /** Get the names of the current registered generators */ + virtual void GetGenerators(std::vector& names) const { + names.push_back(T::GetActualName()); } }; #endif diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 4b07a3689..59ca652a4 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -120,6 +120,9 @@ public: virtual void GetDocumentation(cmDocumentationEntry& entry) const { cmGlobalXCodeGenerator().GetDocumentation(entry); } + + virtual void GetGenerators(std::vector& names) const { + names.push_back(cmGlobalXCodeGenerator::GetActualName()); } }; //---------------------------------------------------------------------------- diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 08a322f9d..2d531ba2b 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -1877,7 +1877,7 @@ void cmake::GetRegisteredGenerators(std::vector& names) for(RegisteredGeneratorsMap::const_iterator i = this->Generators.begin(); i != this->Generators.end(); ++i) { - names.push_back(i->first); + i->second->GetGenerators(names); } for(RegisteredExtraGeneratorsMap::const_iterator i = this->ExtraGenerators.begin();