mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-23 06:47:08 -05:00
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().
This commit is contained in:
committed by
Brad King
parent
984ebc3350
commit
04ff866ca8
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user