Merge topic 'vs14-debug-enum-older-toolsets'
dc422d27
VS: Fix VS 2015 .vcxproj debug setting for older toolsets (#15986)
This commit is contained in:
commit
f8af218ea1
|
@ -2698,6 +2698,33 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Hack to fix flag version selection in a common use case.
|
||||||
|
// FIXME: Select flag table based on toolset instead of VS version.
|
||||||
|
if (this->LocalGenerator->GetVersion() >=
|
||||||
|
cmGlobalVisualStudioGenerator::VS14)
|
||||||
|
{
|
||||||
|
cmGlobalVisualStudio10Generator* gg =
|
||||||
|
static_cast<cmGlobalVisualStudio10Generator*>(this->GlobalGenerator);
|
||||||
|
const char* toolset = gg->GetPlatformToolset();
|
||||||
|
if (toolset &&
|
||||||
|
(cmHasLiteralPrefix(toolset, "v110") ||
|
||||||
|
cmHasLiteralPrefix(toolset, "v120")))
|
||||||
|
{
|
||||||
|
if (const char* debug = linkOptions.GetFlag("GenerateDebugInformation"))
|
||||||
|
{
|
||||||
|
// Convert value from enumeration back to boolean for older toolsets.
|
||||||
|
if (strcmp(debug, "No") == 0)
|
||||||
|
{
|
||||||
|
linkOptions.AddFlag("GenerateDebugInformation", "false");
|
||||||
|
}
|
||||||
|
else if (strcmp(debug, "Debug") == 0)
|
||||||
|
{
|
||||||
|
linkOptions.AddFlag("GenerateDebugInformation", "true");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this->LinkOptions[config] = pOptions.release();
|
this->LinkOptions[config] = pOptions.release();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue