瀏覽代碼

Merge topic 'vs14-debug-enum'

f086c665 VS: Fix VS 2015 .vcxproj file value for GenerateDebugInformation (#15894)
Brad King 9 年之前
父節點
當前提交
cedbb7994d
共有 1 個文件被更改,包括 18 次插入2 次删除
  1. 18 2
      Source/cmVisualStudio10TargetGenerator.cxx

+ 18 - 2
Source/cmVisualStudio10TargetGenerator.cxx

@@ -2599,11 +2599,27 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
 
     if(linkOptions.IsDebug() || flags.find("/debug") != flags.npos)
       {
-      linkOptions.AddFlag("GenerateDebugInformation", "true");
+      if (this->LocalGenerator->GetVersion() >=
+          cmGlobalVisualStudioGenerator::VS14)
+        {
+        linkOptions.AddFlag("GenerateDebugInformation", "Debug");
+        }
+      else
+        {
+        linkOptions.AddFlag("GenerateDebugInformation", "true");
+        }
       }
     else
       {
-      linkOptions.AddFlag("GenerateDebugInformation", "false");
+      if (this->LocalGenerator->GetVersion() >=
+          cmGlobalVisualStudioGenerator::VS14)
+        {
+        linkOptions.AddFlag("GenerateDebugInformation", "No");
+        }
+      else
+        {
+        linkOptions.AddFlag("GenerateDebugInformation", "false");
+        }
       }
     std::string pdb = this->GeneratorTarget->GetPDBDirectory(config.c_str());
     pdb += "/";