Browse Source

Merge topic 'fix-10587-avoid-try-compile-warnings'

984acc8 VS10: avoid warning, no nologo when verbose (#10587)
Brad King 15 years ago
parent
commit
b482ba3e38
1 changed files with 6 additions and 8 deletions
  1. 6 8
      Source/cmVisualStudioGeneratorOptions.cxx

+ 6 - 8
Source/cmVisualStudioGeneratorOptions.cxx

@@ -85,17 +85,15 @@ void cmVisualStudioGeneratorOptions::SetVerboseMakefile(bool verbose)
   // was not given explicitly in the flags we want to add an attribute
   // to the generated project to disable logo suppression.  Otherwise
   // the GUI default is to enable suppression.
+  //
+  // Avoid this on Visual Studio 10 (and later!) because it results in:
+  //   "cl ... warning D9035: option 'nologo-' has been deprecated"
+  //
   if(verbose &&
+     this->Version != 10 &&
      this->FlagMap.find("SuppressStartupBanner") == this->FlagMap.end())
     {
-    if(this->Version == 10)
-      {
-      this->FlagMap["SuppressStartupBanner"] = "false";
-      }
-    else
-      {
-      this->FlagMap["SuppressStartupBanner"] = "FALSE";
-      }
+    this->FlagMap["SuppressStartupBanner"] = "FALSE";
     }
 }