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++.
This commit is contained in:
Calum Robinson
2018-04-26 15:28:01 +01:00
parent 52ae29e63b
commit 27b28c001f

View File

@@ -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;
}