mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user