VS: Map the link `/debug` to its IDE property
Fix the link flag table entries for this flag to be case-insensitive. Also fix the VS 2015 value for the build property enumeration name. This causes `linkOptions.Parse(...)` to correctly extract the `/debug` flag and map it to the IDE property instead. Therefore we do not need to look for the flag explicitly when initializing the property.
This commit is contained in:
parent
c22da7cff7
commit
b3677b35d3
|
@ -155,7 +155,8 @@ static cmVS7FlagTable cmVS10LinkFlagTable[] =
|
||||||
{"AllowIsolation", "ALLOWISOLATION:NO", "", "false", 0},
|
{"AllowIsolation", "ALLOWISOLATION:NO", "", "false", 0},
|
||||||
{"UACUIAccess", "uiAccess='false'", "", "false", 0},
|
{"UACUIAccess", "uiAccess='false'", "", "false", 0},
|
||||||
{"UACUIAccess", "uiAccess='true'", "", "true", 0},
|
{"UACUIAccess", "uiAccess='true'", "", "true", 0},
|
||||||
{"GenerateDebugInformation", "DEBUG", "", "true", 0},
|
{"GenerateDebugInformation", "DEBUG", "", "true",
|
||||||
|
cmVS7FlagTable::CaseInsensitive},
|
||||||
{"MapExports", "MAPINFO:EXPORTS", "", "true", 0},
|
{"MapExports", "MAPINFO:EXPORTS", "", "true", 0},
|
||||||
{"AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0},
|
{"AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0},
|
||||||
{"AssemblyDebug", "ASSEMBLYDEBUG", "", "true", 0},
|
{"AssemblyDebug", "ASSEMBLYDEBUG", "", "true", 0},
|
||||||
|
|
|
@ -177,7 +177,8 @@ static cmVS7FlagTable cmVS11LinkFlagTable[] =
|
||||||
{"UACUIAccess", "uiAccess='false'", "", "false", 0},
|
{"UACUIAccess", "uiAccess='false'", "", "false", 0},
|
||||||
{"UACUIAccess", "uiAccess='true'", "", "true", 0},
|
{"UACUIAccess", "uiAccess='true'", "", "true", 0},
|
||||||
{"ManifestEmbed", "manifest:embed", "", "true", 0},
|
{"ManifestEmbed", "manifest:embed", "", "true", 0},
|
||||||
{"GenerateDebugInformation", "DEBUG", "", "true", 0},
|
{"GenerateDebugInformation", "DEBUG", "", "true",
|
||||||
|
cmVS7FlagTable::CaseInsensitive},
|
||||||
{"MapExports", "MAPINFO:EXPORTS", "", "true", 0},
|
{"MapExports", "MAPINFO:EXPORTS", "", "true", 0},
|
||||||
{"AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0},
|
{"AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0},
|
||||||
{"AssemblyDebug", "ASSEMBLYDEBUG", "", "true", 0},
|
{"AssemblyDebug", "ASSEMBLYDEBUG", "", "true", 0},
|
||||||
|
|
|
@ -177,7 +177,8 @@ static cmVS7FlagTable cmVS12LinkFlagTable[] =
|
||||||
{"UACUIAccess", "uiAccess='false'", "", "false", 0},
|
{"UACUIAccess", "uiAccess='false'", "", "false", 0},
|
||||||
{"UACUIAccess", "uiAccess='true'", "", "true", 0},
|
{"UACUIAccess", "uiAccess='true'", "", "true", 0},
|
||||||
{"ManifestEmbed", "manifest:embed", "", "true", 0},
|
{"ManifestEmbed", "manifest:embed", "", "true", 0},
|
||||||
{"GenerateDebugInformation", "DEBUG", "", "true", 0},
|
{"GenerateDebugInformation", "DEBUG", "", "true",
|
||||||
|
cmVS7FlagTable::CaseInsensitive},
|
||||||
{"MapExports", "MAPINFO:EXPORTS", "", "true", 0},
|
{"MapExports", "MAPINFO:EXPORTS", "", "true", 0},
|
||||||
{"AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0},
|
{"AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0},
|
||||||
{"AssemblyDebug", "ASSEMBLYDEBUG", "", "true", 0},
|
{"AssemblyDebug", "ASSEMBLYDEBUG", "", "true", 0},
|
||||||
|
|
|
@ -177,7 +177,8 @@ static cmVS7FlagTable cmVS14LinkFlagTable[] =
|
||||||
{"UACUIAccess", "uiAccess='false'", "", "false", 0},
|
{"UACUIAccess", "uiAccess='false'", "", "false", 0},
|
||||||
{"UACUIAccess", "uiAccess='true'", "", "true", 0},
|
{"UACUIAccess", "uiAccess='true'", "", "true", 0},
|
||||||
{"ManifestEmbed", "manifest:embed", "", "true", 0},
|
{"ManifestEmbed", "manifest:embed", "", "true", 0},
|
||||||
{"GenerateDebugInformation", "DEBUG", "", "true", 0},
|
{"GenerateDebugInformation", "DEBUG", "", "Debug",
|
||||||
|
cmVS7FlagTable::CaseInsensitive},
|
||||||
{"MapExports", "MAPINFO:EXPORTS", "", "true", 0},
|
{"MapExports", "MAPINFO:EXPORTS", "", "true", 0},
|
||||||
{"AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0},
|
{"AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0},
|
||||||
{"AssemblyDebug", "ASSEMBLYDEBUG", "", "true", 0},
|
{"AssemblyDebug", "ASSEMBLYDEBUG", "", "true", 0},
|
||||||
|
|
|
@ -2597,30 +2597,16 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
|
||||||
linkOptions.AddFlag("StackReserveSize", stackVal);
|
linkOptions.AddFlag("StackReserveSize", stackVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(flags.find("/debug") != flags.npos)
|
if (this->LocalGenerator->GetVersion() >=
|
||||||
|
cmGlobalVisualStudioGenerator::VS14)
|
||||||
{
|
{
|
||||||
if (this->LocalGenerator->GetVersion() >=
|
linkOptions.AddFlag("GenerateDebugInformation", "No");
|
||||||
cmGlobalVisualStudioGenerator::VS14)
|
|
||||||
{
|
|
||||||
linkOptions.AddFlag("GenerateDebugInformation", "Debug");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
linkOptions.AddFlag("GenerateDebugInformation", "true");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (this->LocalGenerator->GetVersion() >=
|
linkOptions.AddFlag("GenerateDebugInformation", "false");
|
||||||
cmGlobalVisualStudioGenerator::VS14)
|
|
||||||
{
|
|
||||||
linkOptions.AddFlag("GenerateDebugInformation", "No");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
linkOptions.AddFlag("GenerateDebugInformation", "false");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string pdb = this->GeneratorTarget->GetPDBDirectory(config.c_str());
|
std::string pdb = this->GeneratorTarget->GetPDBDirectory(config.c_str());
|
||||||
pdb += "/";
|
pdb += "/";
|
||||||
pdb += targetNamePDB;
|
pdb += targetNamePDB;
|
||||||
|
|
Loading…
Reference in New Issue