summaryrefslogtreecommitdiff
path: root/Source/cmVisualStudioGeneratorOptions.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-11-14 09:42:51 -0500
committerBrad King <brad.king@kitware.com>2011-11-14 09:50:47 -0500
commitc92ffece804cd177c3531e58a39c3f0a6487d67d (patch)
tree9e98a0c734edcf6252313bc1b2c5b078644a434d /Source/cmVisualStudioGeneratorOptions.cxx
parent1be4b6f4638334970a3d3f19891b5997ddcf5717 (diff)
downloadcmake-c92ffece804cd177c3531e58a39c3f0a6487d67d.tar.gz
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.
Diffstat (limited to 'Source/cmVisualStudioGeneratorOptions.cxx')
-rw-r--r--Source/cmVisualStudioGeneratorOptions.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx
index a3bf0edfb9..41230e71c8 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())