diff options
author | Patrick Gansterer <paroga@paroga.com> | 2012-11-19 15:13:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2012-11-19 17:54:35 (GMT) |
commit | 04ff866ca8a0c5f4f8712d6cfafcd192ed4cbe58 (patch) | |
tree | 690d285ba132f07a4189cf68564f962aae7cd158 /Source/cmGlobalXCodeGenerator.cxx | |
parent | 984ebc3350f72cb005999f7b796803f83be15304 (diff) | |
download | CMake-04ff866ca8a0c5f4f8712d6cfafcd192ed4cbe58.zip CMake-04ff866ca8a0c5f4f8712d6cfafcd192ed4cbe58.tar.gz CMake-04ff866ca8a0c5f4f8712d6cfafcd192ed4cbe58.tar.bz2 |
Allow a GeneratorFactory handling of more than one generator
Pass the name of the requested generator to the generator factory,
which is now responsible to check if it can create a matching
generator for the name. This allows us to add more logic to the
factory in a next step, so that not every possible generator needs
to get registered explicit in cmake::AddDefaultGenerators().
Diffstat (limited to 'Source/cmGlobalXCodeGenerator.cxx')
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 59ca652..e6f3422 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -116,7 +116,7 @@ public: class cmGlobalXCodeGenerator::Factory : public cmGlobalGeneratorFactory { public: - virtual cmGlobalGenerator* CreateGlobalGenerator() const; + virtual cmGlobalGenerator* CreateGlobalGenerator(const char* name) const; virtual void GetDocumentation(cmDocumentationEntry& entry) const { cmGlobalXCodeGenerator().GetDocumentation(entry); } @@ -152,8 +152,10 @@ cmGlobalGeneratorFactory* cmGlobalXCodeGenerator::NewFactory() //---------------------------------------------------------------------------- cmGlobalGenerator* cmGlobalXCodeGenerator::Factory -::CreateGlobalGenerator() const +::CreateGlobalGenerator(const char* name) const { + if (strcmp(name, GetActualName())) + return 0; #if defined(CMAKE_BUILD_WITH_CMAKE) cmXcodeVersionParser parser; std::string versionFile; |