Browse Source

Merge topic 'vs-managed-fastlink'

27b28c001f VS: Don't turn on /DEBUG:FASTLINK for managed C++ targets

Acked-by: Kitware Robot <[email protected]>
Merge-request: !2011
Brad King 7 years ago
parent
commit
ea8189ee55
1 changed files with 9 additions and 0 deletions
  1. 9 0
      Source/cmVisualStudio10TargetGenerator.cxx

+ 9 - 0
Source/cmVisualStudio10TargetGenerator.cxx

@@ -3475,6 +3475,15 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions(
     }
   }
 
+  // Managed code cannot be linked with /DEBUG:FASTLINK
+  if (this->Managed) {
+    if (const char* debug = linkOptions.GetFlag("GenerateDebugInformation")) {
+      if (strcmp(debug, "DebugFastLink") == 0) {
+        linkOptions.AddFlag("GenerateDebugInformation", "Debug");
+      }
+    }
+  }
+
   this->LinkOptions[config] = std::move(pOptions);
   return true;
 }