diff options
author | Calum Robinson <calum.robinson@sias.com> | 2018-04-26 14:28:01 (GMT) |
---|---|---|
committer | Calum Robinson <calum.robinson@sias.com> | 2018-04-26 14:36:59 (GMT) |
commit | 27b28c001fd96d4a967da3f65c7de9c2859f9b7b (patch) | |
tree | 637f6701a9b665d4541d10492a42857688521601 /Source | |
parent | 52ae29e63baca0f49e5dda0e820b014bfdc56bbe (diff) | |
download | CMake-27b28c001fd96d4a967da3f65c7de9c2859f9b7b.zip CMake-27b28c001fd96d4a967da3f65c7de9c2859f9b7b.tar.gz CMake-27b28c001fd96d4a967da3f65c7de9c2859f9b7b.tar.bz2 |
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++.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
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; } |