diff options
author | Anas Nashif <anas.nashif@intel.com> | 2013-08-13 07:48:01 -0400 |
---|---|---|
committer | Anas Nashif <anas.nashif@intel.com> | 2013-08-13 07:48:01 -0400 |
commit | 297c63fa65327491a2b50e521b661c5835a19fe4 (patch) | |
tree | cf30d58014e240eb5e4417727d8f137cdbe75828 /Source/cmGlobalVisualStudio11Generator.cxx | |
parent | ef8aa19c33e83ff019595fd7f8fdc29c35c336a3 (diff) | |
download | cmake-297c63fa65327491a2b50e521b661c5835a19fe4.tar.gz cmake-297c63fa65327491a2b50e521b661c5835a19fe4.tar.bz2 cmake-297c63fa65327491a2b50e521b661c5835a19fe4.zip |
Imported Upstream version 2.8.11.2upstream/2.8.11.2sandbox/pcoval/previous/upstream
Diffstat (limited to 'Source/cmGlobalVisualStudio11Generator.cxx')
-rw-r--r-- | Source/cmGlobalVisualStudio11Generator.cxx | 74 |
1 files changed, 67 insertions, 7 deletions
diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index 23a1204bd..624d01d69 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 (2012) 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); } +}; + +//---------------------------------------------------------------------------- +cmGlobalGeneratorFactory* cmGlobalVisualStudio11Generator::NewFactory() +{ + return new Factory; +} + //---------------------------------------------------------------------------- -cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator() +cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator( + const char* name, const char* architectureId, + const char* additionalPlatformDefinition) + : cmGlobalVisualStudio10Generator(name, architectureId, + additionalPlatformDefinition) { this->FindMakeProgramFile = "CMakeVS11FindMake.cmake"; std::string vc11Express; @@ -28,7 +81,14 @@ cmGlobalVisualStudio11Generator::cmGlobalVisualStudio11Generator() void cmGlobalVisualStudio11Generator::WriteSLNHeader(std::ostream& fout) { fout << "Microsoft Visual Studio Solution File, Format Version 12.00\n"; - fout << "# Visual Studio 11\n"; + if (this->ExpressEdition) + { + fout << "# Visual Studio Express 2012 for Windows Desktop\n"; + } + else + { + fout << "# Visual Studio 2012\n"; + } } //---------------------------------------------------------------------------- @@ -42,10 +102,10 @@ cmLocalGenerator *cmGlobalVisualStudio11Generator::CreateLocalGenerator() } //---------------------------------------------------------------------------- -void cmGlobalVisualStudio11Generator -::GetDocumentation(cmDocumentationEntry& entry) const +bool cmGlobalVisualStudio11Generator::UseFolderProperty() { - entry.Name = this->GetName(); - entry.Brief = "Generates Visual Studio 11 project files."; - entry.Full = ""; + // Intentionally skip over the parent class implementation and call the + // grand-parent class's implementation. Folders are not supported by the + // Express editions in VS10 and earlier, but they are in VS11 Express. + return cmGlobalVisualStudio8Generator::UseFolderProperty(); } |