From 27b28c001fd96d4a967da3f65c7de9c2859f9b7b Mon Sep 17 00:00:00 2001 From: Calum Robinson Date: Thu, 26 Apr 2018 15:28:01 +0100 Subject: VS: Don't turn on /DEBUG:FASTLINK for managed C++ targets FastLink is only supported for native C++ targets. Turning it off avoids a warning when building managed C++. --- Source/cmVisualStudio10TargetGenerator.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 50b7d52..bab96e7 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -3414,6 +3414,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; } -- cgit v0.12