diff options
-rw-r--r-- | Source/cmGlobalVisualStudio11Generator.cxx | 11 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudio11Generator.h | 3 | ||||
-rw-r--r-- | Source/cmLocalVisualStudioGenerator.h | 3 | ||||
-rw-r--r-- | Source/cmVisualStudioGeneratorOptions.cxx | 13 |
4 files changed, 23 insertions, 7 deletions
diff --git a/Source/cmGlobalVisualStudio11Generator.cxx b/Source/cmGlobalVisualStudio11Generator.cxx index 97308bb..be7fd55 100644 --- a/Source/cmGlobalVisualStudio11Generator.cxx +++ b/Source/cmGlobalVisualStudio11Generator.cxx @@ -10,6 +10,7 @@ See the License for more information. ============================================================================*/ #include "cmGlobalVisualStudio11Generator.h" +#include "cmLocalVisualStudio10Generator.h" #include "cmMakefile.h" //---------------------------------------------------------------------------- @@ -36,6 +37,16 @@ void cmGlobalVisualStudio11Generator::WriteSLNHeader(std::ostream& fout) } //---------------------------------------------------------------------------- +cmLocalGenerator *cmGlobalVisualStudio11Generator::CreateLocalGenerator() +{ + cmLocalVisualStudio10Generator* lg = + new cmLocalVisualStudio10Generator(cmLocalVisualStudioGenerator::VS11); + lg->SetPlatformName(this->GetPlatformName()); + lg->SetGlobalGenerator(this); + return lg; +} + +//---------------------------------------------------------------------------- void cmGlobalVisualStudio11Generator ::GetDocumentation(cmDocumentationEntry& entry) const { diff --git a/Source/cmGlobalVisualStudio11Generator.h b/Source/cmGlobalVisualStudio11Generator.h index 14019a7..7e8f6aa 100644 --- a/Source/cmGlobalVisualStudio11Generator.h +++ b/Source/cmGlobalVisualStudio11Generator.h @@ -35,6 +35,9 @@ public: /** Get the documentation entry for this generator. */ virtual void GetDocumentation(cmDocumentationEntry& entry) const; + ///! create the correct local generator + virtual cmLocalGenerator *CreateLocalGenerator(); + /** TODO: VS 11 user macro support. */ virtual std::string GetUserMacrosDirectory() { return ""; } protected: diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h index 9794d59..fcf1f21 100644 --- a/Source/cmLocalVisualStudioGenerator.h +++ b/Source/cmLocalVisualStudioGenerator.h @@ -37,7 +37,8 @@ public: VS71 = 71, VS8 = 80, VS9 = 90, - VS10 = 100 + VS10 = 100, + VS11 = 110 }; cmLocalVisualStudioGenerator(VSVersion v); diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index a3bf0ed..41230e7 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -65,6 +65,7 @@ void cmVisualStudioGeneratorOptions::FixExceptionHandlingDefault() this->FlagMap["ExceptionHandling"] = "FALSE"; break; case cmLocalVisualStudioGenerator::VS10: + case cmLocalVisualStudioGenerator::VS11: // by default VS puts <ExceptionHandling></ExceptionHandling> empty // for a project, to make our projects look the same put a new line // and space over for the closing </ExceptionHandling> as the default @@ -211,7 +212,7 @@ cmVisualStudioGeneratorOptions { return; } - if(this->Version == cmLocalVisualStudioGenerator::VS10) + if(this->Version >= cmLocalVisualStudioGenerator::VS10) { // if there are configuration specifc flags, then // use the configuration specific tag for PreprocessorDefinitions @@ -239,7 +240,7 @@ cmVisualStudioGeneratorOptions { // Escape the definition for the compiler. std::string define; - if(this->Version != cmLocalVisualStudioGenerator::VS10) + if(this->Version < cmLocalVisualStudioGenerator::VS10) { define = this->LocalGenerator->EscapeForShell(di->c_str(), true); @@ -249,7 +250,7 @@ cmVisualStudioGeneratorOptions define = *di; } // Escape this flag for the IDE. - if(this->Version == cmLocalVisualStudioGenerator::VS10) + if(this->Version >= cmLocalVisualStudioGenerator::VS10) { define = cmVisualStudio10GeneratorOptionsEscapeForXML(define.c_str()); @@ -266,7 +267,7 @@ cmVisualStudioGeneratorOptions fout << sep << define; sep = ";"; } - if(this->Version == cmLocalVisualStudioGenerator::VS10) + if(this->Version >= cmLocalVisualStudioGenerator::VS10) { fout << ";%(PreprocessorDefinitions)</PreprocessorDefinitions>" << suffix; } @@ -281,7 +282,7 @@ void cmVisualStudioGeneratorOptions ::OutputFlagMap(std::ostream& fout, const char* indent) { - if(this->Version == cmLocalVisualStudioGenerator::VS10) + if(this->Version >= cmLocalVisualStudioGenerator::VS10) { for(std::map<cmStdString, cmStdString>::iterator m = this->FlagMap.begin(); m != this->FlagMap.end(); ++m) @@ -326,7 +327,7 @@ cmVisualStudioGeneratorOptions { if(!this->FlagString.empty()) { - if(this->Version == cmLocalVisualStudioGenerator::VS10) + if(this->Version >= cmLocalVisualStudioGenerator::VS10) { fout << prefix; if(this->Configuration.size()) |