diff options
Diffstat (limited to 'Source/cmGlobalVisualStudio11Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio11Generator.cxx | 64 |
1 files changed, 54 insertions, 10 deletions
diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index 1f4693a..ba30e18 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -13,8 +13,61 @@ #include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" +static const char vs11Win32generatorName[] = "Visual Studio 11"; +static const char vs11Win64generatorName[] = "Visual Studio 11 Win64"; +static const char vs11ARMgeneratorName[] = "Visual Studio 11 ARM"; + +class cmGlobalVisualStudio11Generator::Factory + : public cmGlobalGeneratorFactory +{ +public: + virtual cmGlobalGenerator* CreateGlobalGenerator(const char* name) const { + if(!strcmp(name, vs11Win32generatorName)) + { + return new cmGlobalVisualStudio11Generator( + vs11Win32generatorName, NULL, NULL); + } + if(!strcmp(name, vs11Win64generatorName)) + { + return new cmGlobalVisualStudio11Generator( + vs11Win64generatorName, "x64", "CMAKE_FORCE_WIN64"); + } + if(!strcmp(name, vs11ARMgeneratorName)) + { + return new cmGlobalVisualStudio11Generator( + vs11ARMgeneratorName, "ARM", NULL); + } + return 0; + } + + virtual void GetDocumentation(cmDocumentationEntry& entry) const { + entry.Name = "Visual Studio 11"; + entry.Brief = "Generates Visual Studio 11 project files."; + entry.Full = + "It is possible to append a space followed by the platform name " + "to create project files for a specific target platform. E.g. " + "\"Visual Studio 11 Win64\" will create project files for " + "the x64 processor; \"Visual Studio 11 ARM\" for ARM."; + } + + virtual void GetGenerators(std::vector<std::string>& names) const { + names.push_back(vs11Win32generatorName); + names.push_back(vs11Win64generatorName); + names.push_back(vs11ARMgeneratorName); } +}; + //---------------------------------------------------------------------------- -cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator() +cmGlobalGeneratorFactory* cmGlobalVisualStudio11Generator::NewFactory() +{ + return new Factory; +} + +//---------------------------------------------------------------------------- +cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator( + const char* name, const char* architectureId, + const char* additionalPlatformDefinition) + : cmGlobalVisualStudio10Generator(name, architectureId, + additionalPlatformDefinition) { this->FindMakeProgramFile = "CMakeVS11FindMake.cmake"; std::string vc11Express; @@ -40,12 +93,3 @@ cmLocalGenerator *cmGlobalVisualStudio11Generator::CreateLocalGenerator() lg->SetGlobalGenerator(this); return lg; } - -//---------------------------------------------------------------------------- -void cmGlobalVisualStudio11Generator -::GetDocumentation(cmDocumentationEntry& entry) -{ - entry.Name = cmGlobalVisualStudio11Generator::GetActualName(); - entry.Brief = "Generates Visual Studio 11 project files."; - entry.Full = ""; -} |