This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via 98094a28c599c9d9faa13bb38a9989be7bcabefa (commit) via c92ffece804cd177c3531e58a39c3f0a6487d67d (commit) via 1be4b6f4638334970a3d3f19891b5997ddcf5717 (commit) from 479f502428937e8f30b47afa824836eac4206c8f (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=98094a28c599c9d9faa13bb38a9989be7bcabefa commit 98094a28c599c9d9faa13bb38a9989be7bcabefa Merge: 479f502 c92ffec Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Nov 14 10:12:44 2011 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Mon Nov 14 10:12:44 2011 -0500 Merge topic 'vs-version-ivar' into next c92ffec Enumerate VS11 version explicitly in local generators 1be4b6f Order VS local generator Version ivar values consistently http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c92ffece804cd177c3531e58a39c3f0a6487d67d commit c92ffece804cd177c3531e58a39c3f0a6487d67d Author: Brad King <brad.k...@kitware.com> AuthorDate: Mon Nov 14 09:42:51 2011 -0500 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Nov 14 09:50:47 2011 -0500 Enumerate VS11 version explicitly in local generators Since the parent commit the local generator Version ivar may be compared for ordering. Convert comparisons: "==VS10" becomes ">=VS10" "!=VS10" becomes "< VS10" to support an explicit enumeration value for VS11 with no change in behavior. 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()) http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1be4b6f4638334970a3d3f19891b5997ddcf5717 commit 1be4b6f4638334970a3d3f19891b5997ddcf5717 Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Nov 10 17:17:41 2011 -0500 Commit: Brad King <brad.k...@kitware.com> CommitDate: Mon Nov 14 09:47:31 2011 -0500 Order VS local generator Version ivar values consistently Move the Version member to the top cmLocalVisualStudioGenerator class and set it consistently for instances created by all the global generator versions. Use an enumeration type with values scaled by a factor of 10 so we can handle VS 7.1 without out-of-order numbers. VS 7.1 support for SuppressStartupBanner was broken by commit 25116a3c (Fix CMAKE_VERBOSE_MAKEFILE for VS10 vcxproj files, 2011-10-11) because it assumed comparison of VS version numbers works. Now it does. diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx index ec8f4a5..22ead10 100644 --- a/Source/cmGlobalVisualStudio10Generator.cxx +++ b/Source/cmGlobalVisualStudio10Generator.cxx @@ -43,7 +43,8 @@ void cmGlobalVisualStudio10Generator::WriteSLNHeader(std::ostream& fout) ///! Create a local generator appropriate to this Global Generator cmLocalGenerator *cmGlobalVisualStudio10Generator::CreateLocalGenerator() { - cmLocalVisualStudio10Generator* lg = new cmLocalVisualStudio10Generator; + cmLocalVisualStudio10Generator* lg = + new cmLocalVisualStudio10Generator(cmLocalVisualStudioGenerator::VS10); lg->SetPlatformName(this->GetPlatformName()); lg->SetGlobalGenerator(this); return lg; diff --git a/Source/cmGlobalVisualStudio71Generator.cxx b/Source/cmGlobalVisualStudio71Generator.cxx index adb5f2f..a5feaca 100644 --- a/Source/cmGlobalVisualStudio71Generator.cxx +++ b/Source/cmGlobalVisualStudio71Generator.cxx @@ -26,8 +26,8 @@ cmGlobalVisualStudio71Generator::cmGlobalVisualStudio71Generator() ///! Create a local generator appropriate to this Global Generator cmLocalGenerator *cmGlobalVisualStudio71Generator::CreateLocalGenerator() { - cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; - lg->SetVersion71(); + cmLocalVisualStudio7Generator *lg = + new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS71); lg->SetExtraFlagTable(this->GetExtraFlagTableVS7()); lg->SetGlobalGenerator(this); return lg; diff --git a/Source/cmGlobalVisualStudio7Generator.cxx b/Source/cmGlobalVisualStudio7Generator.cxx index 84e7f1b..a68e6d8 100644 --- a/Source/cmGlobalVisualStudio7Generator.cxx +++ b/Source/cmGlobalVisualStudio7Generator.cxx @@ -133,7 +133,8 @@ std::string cmGlobalVisualStudio7Generator ///! Create a local generator appropriate to this Global Generator cmLocalGenerator *cmGlobalVisualStudio7Generator::CreateLocalGenerator() { - cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; + cmLocalVisualStudio7Generator *lg = + new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS7); lg->SetExtraFlagTable(this->GetExtraFlagTableVS7()); lg->SetGlobalGenerator(this); return lg; diff --git a/Source/cmGlobalVisualStudio8Generator.cxx b/Source/cmGlobalVisualStudio8Generator.cxx index ef723b7..a723109 100644 --- a/Source/cmGlobalVisualStudio8Generator.cxx +++ b/Source/cmGlobalVisualStudio8Generator.cxx @@ -28,8 +28,8 @@ cmGlobalVisualStudio8Generator::cmGlobalVisualStudio8Generator() ///! Create a local generator appropriate to this Global Generator cmLocalGenerator *cmGlobalVisualStudio8Generator::CreateLocalGenerator() { - cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; - lg->SetVersion8(); + cmLocalVisualStudio7Generator *lg = + new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS8); lg->SetPlatformName(this->GetPlatformName()); lg->SetExtraFlagTable(this->GetExtraFlagTableVS8()); lg->SetGlobalGenerator(this); diff --git a/Source/cmGlobalVisualStudio8Win64Generator.cxx b/Source/cmGlobalVisualStudio8Win64Generator.cxx index 3469b17..60e45b8 100644 --- a/Source/cmGlobalVisualStudio8Win64Generator.cxx +++ b/Source/cmGlobalVisualStudio8Win64Generator.cxx @@ -25,8 +25,8 @@ cmGlobalVisualStudio8Win64Generator::cmGlobalVisualStudio8Win64Generator() ///! Create a local generator appropriate to this Global Generator cmLocalGenerator *cmGlobalVisualStudio8Win64Generator::CreateLocalGenerator() { - cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; - lg->SetVersion8(); + cmLocalVisualStudio7Generator *lg + = new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS8); lg->SetPlatformName(this->GetPlatformName()); lg->SetExtraFlagTable(this->GetExtraFlagTableVS8()); lg->SetGlobalGenerator(this); diff --git a/Source/cmGlobalVisualStudio9Generator.cxx b/Source/cmGlobalVisualStudio9Generator.cxx index f8ceea0..f082675 100644 --- a/Source/cmGlobalVisualStudio9Generator.cxx +++ b/Source/cmGlobalVisualStudio9Generator.cxx @@ -40,8 +40,8 @@ void cmGlobalVisualStudio9Generator::WriteSLNHeader(std::ostream& fout) ///! Create a local generator appropriate to this Global Generator cmLocalGenerator *cmGlobalVisualStudio9Generator::CreateLocalGenerator() { - cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; - lg->SetVersion9(); + cmLocalVisualStudio7Generator *lg + = new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS9); lg->SetPlatformName(this->GetPlatformName()); lg->SetExtraFlagTable(this->GetExtraFlagTableVS8()); lg->SetGlobalGenerator(this); diff --git a/Source/cmGlobalVisualStudio9IA64Generator.cxx b/Source/cmGlobalVisualStudio9IA64Generator.cxx index d49739b..993340a 100644 --- a/Source/cmGlobalVisualStudio9IA64Generator.cxx +++ b/Source/cmGlobalVisualStudio9IA64Generator.cxx @@ -22,8 +22,8 @@ cmGlobalVisualStudio9IA64Generator::cmGlobalVisualStudio9IA64Generator() ///! Create a local generator appropriate to this Global Generator cmLocalGenerator *cmGlobalVisualStudio9IA64Generator::CreateLocalGenerator() { - cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; - lg->SetVersion9(); + cmLocalVisualStudio7Generator *lg = + new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS9); lg->SetPlatformName(this->GetPlatformName()); lg->SetExtraFlagTable(this->GetExtraFlagTableVS8()); lg->SetGlobalGenerator(this); diff --git a/Source/cmGlobalVisualStudio9Win64Generator.cxx b/Source/cmGlobalVisualStudio9Win64Generator.cxx index ff4fd4f..08f537d 100644 --- a/Source/cmGlobalVisualStudio9Win64Generator.cxx +++ b/Source/cmGlobalVisualStudio9Win64Generator.cxx @@ -22,8 +22,8 @@ cmGlobalVisualStudio9Win64Generator::cmGlobalVisualStudio9Win64Generator() ///! Create a local generator appropriate to this Global Generator cmLocalGenerator *cmGlobalVisualStudio9Win64Generator::CreateLocalGenerator() { - cmLocalVisualStudio7Generator *lg = new cmLocalVisualStudio7Generator; - lg->SetVersion9(); + cmLocalVisualStudio7Generator *lg = + new cmLocalVisualStudio7Generator(cmLocalVisualStudioGenerator::VS9); lg->SetPlatformName(this->GetPlatformName()); lg->SetExtraFlagTable(this->GetExtraFlagTableVS8()); lg->SetGlobalGenerator(this); diff --git a/Source/cmLocalVisualStudio10Generator.cxx b/Source/cmLocalVisualStudio10Generator.cxx index ef378f9..8b22705 100644 --- a/Source/cmLocalVisualStudio10Generator.cxx +++ b/Source/cmLocalVisualStudio10Generator.cxx @@ -61,7 +61,8 @@ class cmVS10XMLParser : public cmXMLParser //---------------------------------------------------------------------------- -cmLocalVisualStudio10Generator::cmLocalVisualStudio10Generator() +cmLocalVisualStudio10Generator::cmLocalVisualStudio10Generator(VSVersion v): + cmLocalVisualStudio7Generator(v) { } diff --git a/Source/cmLocalVisualStudio10Generator.h b/Source/cmLocalVisualStudio10Generator.h index 0fccdb0..699de4c 100644 --- a/Source/cmLocalVisualStudio10Generator.h +++ b/Source/cmLocalVisualStudio10Generator.h @@ -25,7 +25,7 @@ class cmLocalVisualStudio10Generator : public cmLocalVisualStudio7Generator { public: ///! Set cache only and recurse to false by default. - cmLocalVisualStudio10Generator(); + cmLocalVisualStudio10Generator(VSVersion v); virtual ~cmLocalVisualStudio10Generator(); diff --git a/Source/cmLocalVisualStudio6Generator.cxx b/Source/cmLocalVisualStudio6Generator.cxx index 095e1a7..1dfcbea 100644 --- a/Source/cmLocalVisualStudio6Generator.cxx +++ b/Source/cmLocalVisualStudio6Generator.cxx @@ -21,7 +21,8 @@ #include <cmsys/RegularExpression.hxx> -cmLocalVisualStudio6Generator::cmLocalVisualStudio6Generator() +cmLocalVisualStudio6Generator::cmLocalVisualStudio6Generator(): + cmLocalVisualStudioGenerator(VS6) { } diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index ae70759..8185b95 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -45,9 +45,9 @@ private: extern cmVS7FlagTable cmLocalVisualStudio7GeneratorFlagTable[]; //---------------------------------------------------------------------------- -cmLocalVisualStudio7Generator::cmLocalVisualStudio7Generator() +cmLocalVisualStudio7Generator::cmLocalVisualStudio7Generator(VSVersion v): + cmLocalVisualStudioGenerator(v) { - this->Version = 7; this->PlatformName = "Win32"; this->ExtraFlagTable = 0; this->Internal = new cmLocalVisualStudio7GeneratorInternals(this); @@ -719,7 +719,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, t = Options::FortranCompiler; table = cmLocalVisualStudio7GeneratorFortranFlagTable; } - Options targetOptions(this, this->Version, t, + Options targetOptions(this, t, table, this->ExtraFlagTable); targetOptions.FixExceptionHandlingDefault(); @@ -888,7 +888,7 @@ void cmLocalVisualStudio7Generator::WriteConfiguration(std::ostream& fout, // end of <Tool Name=VCMIDLTool // Check if we need the FAT32 workaround. - if(targetBuilds && this->Version >= 8) + if(targetBuilds && this->Version >= VS8) { // Check the filesystem type where the target will be written. if(cmLVS6G_IsFAT(target.GetDirectory(configName).c_str())) @@ -975,7 +975,7 @@ void cmLocalVisualStudio7Generator::OutputBuildTool(std::ostream& fout, extraLinkOptions += " "; extraLinkOptions += targetLinkFlags; } - Options linkOptions(this, this->Version, Options::Linker, + Options linkOptions(this, Options::Linker, cmLocalVisualStudio7GeneratorLinkFlagTable); linkOptions.Parse(extraLinkOptions.c_str()); if(!this->ModuleDefinitionFile.empty()) @@ -1604,7 +1604,7 @@ void cmLocalVisualStudio7Generator tool = Options::FortranCompiler; table = cmLocalVisualStudio7GeneratorFortranFlagTable; } - Options fileOptions(this, this->Version, tool, table, + Options fileOptions(this, tool, table, this->ExtraFlagTable); fileOptions.Parse(fc.CompileFlags.c_str()); fileOptions.AddDefines(fc.CompileDefs.c_str()); @@ -1920,13 +1920,13 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout, fout << "<?xml version=\"1.0\" encoding = \"Windows-1252\"?>\n" << "<VisualStudioProject\n" << "\tProjectType=\"Visual C++\"\n"; - if(this->Version == 71) + if(this->Version == VS71) { fout << "\tVersion=\"7.10\"\n"; } else { - fout << "\tVersion=\"" << this->Version << ".00\"\n"; + fout << "\tVersion=\"" << (this->Version/10) << ".00\"\n"; } const char* projLabel = target.GetProperty("PROJECT_LABEL"); if(!projLabel) @@ -1941,7 +1941,7 @@ cmLocalVisualStudio7Generator::WriteProjectStart(std::ostream& fout, cmGlobalVisualStudio7Generator* gg = static_cast<cmGlobalVisualStudio7Generator *>(this->GlobalGenerator); fout << "\tName=\"" << projLabel << "\"\n"; - if(this->Version >= 8) + if(this->Version >= VS8) { fout << "\tProjectGUID=\"{" << gg->GetGUID(libName) << "}\"\n"; } diff --git a/Source/cmLocalVisualStudio7Generator.h b/Source/cmLocalVisualStudio7Generator.h index cdd714e..5b634b8 100644 --- a/Source/cmLocalVisualStudio7Generator.h +++ b/Source/cmLocalVisualStudio7Generator.h @@ -35,7 +35,7 @@ class cmLocalVisualStudio7Generator : public cmLocalVisualStudioGenerator { public: ///! Set cache only and recurse to false by default. - cmLocalVisualStudio7Generator(); + cmLocalVisualStudio7Generator(VSVersion v); virtual ~cmLocalVisualStudio7Generator(); @@ -53,9 +53,6 @@ public: */ void SetBuildType(BuildType,const char *name); - void SetVersion71() {this->Version = 71;} - void SetVersion8() {this->Version = 8;} - void SetVersion9() {this->Version = 9;} void SetPlatformName(const char* n) { this->PlatformName = n;} void GetTargetObjectFileDirectories(cmTarget* target, std::vector<std::string>& @@ -130,7 +127,6 @@ private: cmVS7FlagTable const* ExtraFlagTable; std::string ModuleDefinitionFile; - int Version; bool FortranProject; std::string PlatformName; // Win32 or x64 cmLocalVisualStudio7GeneratorInternals* Internal; diff --git a/Source/cmLocalVisualStudioGenerator.cxx b/Source/cmLocalVisualStudioGenerator.cxx index 4390a08..4d16409 100644 --- a/Source/cmLocalVisualStudioGenerator.cxx +++ b/Source/cmLocalVisualStudioGenerator.cxx @@ -18,10 +18,11 @@ #include "windows.h" //---------------------------------------------------------------------------- -cmLocalVisualStudioGenerator::cmLocalVisualStudioGenerator() +cmLocalVisualStudioGenerator::cmLocalVisualStudioGenerator(VSVersion v) { this->WindowsShell = true; this->WindowsVSIDE = true; + this->Version = v; } //---------------------------------------------------------------------------- diff --git a/Source/cmLocalVisualStudioGenerator.h b/Source/cmLocalVisualStudioGenerator.h index a38bc30..9794d59 100644 --- a/Source/cmLocalVisualStudioGenerator.h +++ b/Source/cmLocalVisualStudioGenerator.h @@ -29,7 +29,18 @@ class cmCustomCommand; class cmLocalVisualStudioGenerator : public cmLocalGenerator { public: - cmLocalVisualStudioGenerator(); + /** Known versions of Visual Studio. */ + enum VSVersion + { + VS6 = 60, + VS7 = 70, + VS71 = 71, + VS8 = 80, + VS9 = 90, + VS10 = 100 + }; + + cmLocalVisualStudioGenerator(VSVersion v); virtual ~cmLocalVisualStudioGenerator(); /** Construct a script from the given list of command lines. */ @@ -41,6 +52,9 @@ public: sequence of custom commands. */ const char* GetReportErrorLabel() const; + /** Version of Visual Studio. */ + VSVersion GetVersion() const { return this->Version; } + protected: virtual const char* ReportErrorLabel() const; virtual bool CustomCommandUseLocal() const { return false; } @@ -58,6 +72,8 @@ protected: std::map<cmStdString, int>& count); std::set<const cmSourceFile*> NeedObjectName; friend class cmVisualStudio10TargetGenerator; + + VSVersion Version; }; #endif diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 45a79c8..2c9ef37 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -905,7 +905,7 @@ bool cmVisualStudio10TargetGenerator::OutputSourceSpecificFlags( hasFlags = true; cmVisualStudioGeneratorOptions clOptions(this->LocalGenerator, - 10, cmVisualStudioGeneratorOptions::Compiler, + cmVisualStudioGeneratorOptions::Compiler, cmVS10CLFlagTable, 0, this); clOptions.Parse(flags.c_str()); clOptions.AddDefines(configDefines.c_str()); @@ -1090,7 +1090,7 @@ bool cmVisualStudio10TargetGenerator::ComputeClOptions( // TODO: Integrate code below with cmLocalVisualStudio7Generator. cmsys::auto_ptr<Options> pOptions( - new Options(this->LocalGenerator, 10, Options::Compiler, + new Options(this->LocalGenerator, Options::Compiler, cmVS10CLFlagTable)); Options& clOptions = *pOptions; @@ -1245,7 +1245,7 @@ cmVisualStudio10TargetGenerator::WriteLibOptions(std::string const& config) { this->WriteString("<Lib>\n", 2); cmVisualStudioGeneratorOptions - libOptions(this->LocalGenerator, 10, + libOptions(this->LocalGenerator, cmVisualStudioGeneratorOptions::Linker, cmVS10LibFlagTable, 0, this); libOptions.Parse(libflags?libflags:""); @@ -1325,7 +1325,7 @@ void cmVisualStudio10TargetGenerator::WriteLinkOptions(std::string const& flags += flagsConfig; } cmVisualStudioGeneratorOptions - linkOptions(this->LocalGenerator, 10, + linkOptions(this->LocalGenerator, cmVisualStudioGeneratorOptions::Linker, cmVS10LinkFlagTable, 0, this); if ( this->Target->GetPropertyAsBool("WIN32_EXECUTABLE") ) diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 4edeedc..a3bf0ed 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -25,14 +25,13 @@ inline std::string cmVisualStudioGeneratorOptionsEscapeForXML(const char* s) //---------------------------------------------------------------------------- cmVisualStudioGeneratorOptions -::cmVisualStudioGeneratorOptions(cmLocalGenerator* lg, - int version, +::cmVisualStudioGeneratorOptions(cmLocalVisualStudioGenerator* lg, Tool tool, cmVS7FlagTable const* table, cmVS7FlagTable const* extraTable, cmVisualStudio10TargetGenerator* g): cmIDEOptions(), - LocalGenerator(lg), Version(version), CurrentTool(tool), + LocalGenerator(lg), Version(lg->GetVersion()), CurrentTool(tool), TargetGenerator(g) { // Store the given flag tables. @@ -61,11 +60,11 @@ void cmVisualStudioGeneratorOptions::FixExceptionHandlingDefault() // remove the flag we need to override the IDE default of on. switch (this->Version) { - case 7: - case 71: + case cmLocalVisualStudioGenerator::VS7: + case cmLocalVisualStudioGenerator::VS71: this->FlagMap["ExceptionHandling"] = "FALSE"; break; - case 10: + case cmLocalVisualStudioGenerator::VS10: // 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 @@ -93,7 +92,8 @@ void cmVisualStudioGeneratorOptions::SetVerboseMakefile(bool verbose) if(verbose && this->FlagMap.find("SuppressStartupBanner") == this->FlagMap.end()) { - this->FlagMap["SuppressStartupBanner"] = this->Version < 10 ? "FALSE" : ""; + this->FlagMap["SuppressStartupBanner"] = + this->Version < cmLocalVisualStudioGenerator::VS10 ? "FALSE" : ""; } } @@ -211,7 +211,7 @@ cmVisualStudioGeneratorOptions { return; } - if(this->Version == 10) + if(this->Version == cmLocalVisualStudioGenerator::VS10) { // if there are configuration specifc flags, then // use the configuration specific tag for PreprocessorDefinitions @@ -239,7 +239,7 @@ cmVisualStudioGeneratorOptions { // Escape the definition for the compiler. std::string define; - if(this->Version != 10) + if(this->Version != cmLocalVisualStudioGenerator::VS10) { define = this->LocalGenerator->EscapeForShell(di->c_str(), true); @@ -249,7 +249,7 @@ cmVisualStudioGeneratorOptions define = *di; } // Escape this flag for the IDE. - if(this->Version == 10) + if(this->Version == cmLocalVisualStudioGenerator::VS10) { define = cmVisualStudio10GeneratorOptionsEscapeForXML(define.c_str()); @@ -266,7 +266,7 @@ cmVisualStudioGeneratorOptions fout << sep << define; sep = ";"; } - if(this->Version == 10) + if(this->Version == cmLocalVisualStudioGenerator::VS10) { fout << ";%(PreprocessorDefinitions)</PreprocessorDefinitions>" << suffix; } @@ -281,7 +281,7 @@ void cmVisualStudioGeneratorOptions ::OutputFlagMap(std::ostream& fout, const char* indent) { - if(this->Version == 10) + if(this->Version == cmLocalVisualStudioGenerator::VS10) { for(std::map<cmStdString, cmStdString>::iterator m = this->FlagMap.begin(); m != this->FlagMap.end(); ++m) @@ -326,7 +326,7 @@ cmVisualStudioGeneratorOptions { if(!this->FlagString.empty()) { - if(this->Version == 10) + if(this->Version == cmLocalVisualStudioGenerator::VS10) { fout << prefix; if(this->Configuration.size()) diff --git a/Source/cmVisualStudioGeneratorOptions.h b/Source/cmVisualStudioGeneratorOptions.h index fadc4b5..51a1362 100644 --- a/Source/cmVisualStudioGeneratorOptions.h +++ b/Source/cmVisualStudioGeneratorOptions.h @@ -12,7 +12,7 @@ #ifndef cmVisualStudioGeneratorOptions_h #define cmVisualStudioGeneratorOptions_h -#include "cmLocalGenerator.h" +#include "cmLocalVisualStudioGenerator.h" #include "cmIDEOptions.h" typedef cmIDEFlagTable cmVS7FlagTable; @@ -30,8 +30,7 @@ public: Linker, FortranCompiler }; - cmVisualStudioGeneratorOptions(cmLocalGenerator* lg, - int version, + cmVisualStudioGeneratorOptions(cmLocalVisualStudioGenerator* lg, Tool tool, cmVS7FlagTable const* table, cmVS7FlagTable const* extraTable = 0, @@ -62,8 +61,8 @@ public: const char* suffix); void SetConfiguration(const char* config); private: - cmLocalGenerator* LocalGenerator; - int Version; + cmLocalVisualStudioGenerator* LocalGenerator; + cmLocalVisualStudioGenerator::VSVersion Version; std::string Configuration; Tool CurrentTool; ----------------------------------------------------------------------- Summary of changes: Source/cmGlobalVisualStudio10Generator.cxx | 3 +- Source/cmGlobalVisualStudio11Generator.cxx | 11 +++++++++ Source/cmGlobalVisualStudio11Generator.h | 3 ++ Source/cmGlobalVisualStudio71Generator.cxx | 4 +- Source/cmGlobalVisualStudio7Generator.cxx | 3 +- Source/cmGlobalVisualStudio8Generator.cxx | 4 +- Source/cmGlobalVisualStudio8Win64Generator.cxx | 4 +- Source/cmGlobalVisualStudio9Generator.cxx | 4 +- Source/cmGlobalVisualStudio9IA64Generator.cxx | 4 +- Source/cmGlobalVisualStudio9Win64Generator.cxx | 4 +- Source/cmLocalVisualStudio10Generator.cxx | 3 +- Source/cmLocalVisualStudio10Generator.h | 2 +- Source/cmLocalVisualStudio6Generator.cxx | 3 +- Source/cmLocalVisualStudio7Generator.cxx | 18 ++++++++-------- Source/cmLocalVisualStudio7Generator.h | 6 +---- Source/cmLocalVisualStudioGenerator.cxx | 3 +- Source/cmLocalVisualStudioGenerator.h | 19 ++++++++++++++++- Source/cmVisualStudio10TargetGenerator.cxx | 8 +++--- Source/cmVisualStudioGeneratorOptions.cxx | 27 ++++++++++++----------- Source/cmVisualStudioGeneratorOptions.h | 9 +++---- 20 files changed, 87 insertions(+), 55 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits