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:
Brad King 2016-01-08 14:38:58 -05:00
parent c22da7cff7
commit b3677b35d3
5 changed files with 13 additions and 23 deletions

View File

@ -155,7 +155,8 @@ static cmVS7FlagTable cmVS10LinkFlagTable[] =
{"AllowIsolation", "ALLOWISOLATION:NO", "", "false", 0},
{"UACUIAccess", "uiAccess='false'", "", "false", 0},
{"UACUIAccess", "uiAccess='true'", "", "true", 0},
{"GenerateDebugInformation", "DEBUG", "", "true", 0},
{"GenerateDebugInformation", "DEBUG", "", "true",
cmVS7FlagTable::CaseInsensitive},
{"MapExports", "MAPINFO:EXPORTS", "", "true", 0},
{"AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0},
{"AssemblyDebug", "ASSEMBLYDEBUG", "", "true", 0},

View File

@ -177,7 +177,8 @@ static cmVS7FlagTable cmVS11LinkFlagTable[] =
{"UACUIAccess", "uiAccess='false'", "", "false", 0},
{"UACUIAccess", "uiAccess='true'", "", "true", 0},
{"ManifestEmbed", "manifest:embed", "", "true", 0},
{"GenerateDebugInformation", "DEBUG", "", "true", 0},
{"GenerateDebugInformation", "DEBUG", "", "true",
cmVS7FlagTable::CaseInsensitive},
{"MapExports", "MAPINFO:EXPORTS", "", "true", 0},
{"AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0},
{"AssemblyDebug", "ASSEMBLYDEBUG", "", "true", 0},

View File

@ -177,7 +177,8 @@ static cmVS7FlagTable cmVS12LinkFlagTable[] =
{"UACUIAccess", "uiAccess='false'", "", "false", 0},
{"UACUIAccess", "uiAccess='true'", "", "true", 0},
{"ManifestEmbed", "manifest:embed", "", "true", 0},
{"GenerateDebugInformation", "DEBUG", "", "true", 0},
{"GenerateDebugInformation", "DEBUG", "", "true",
cmVS7FlagTable::CaseInsensitive},
{"MapExports", "MAPINFO:EXPORTS", "", "true", 0},
{"AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0},
{"AssemblyDebug", "ASSEMBLYDEBUG", "", "true", 0},

View File

@ -177,7 +177,8 @@ static cmVS7FlagTable cmVS14LinkFlagTable[] =
{"UACUIAccess", "uiAccess='false'", "", "false", 0},
{"UACUIAccess", "uiAccess='true'", "", "true", 0},
{"ManifestEmbed", "manifest:embed", "", "true", 0},
{"GenerateDebugInformation", "DEBUG", "", "true", 0},
{"GenerateDebugInformation", "DEBUG", "", "Debug",
cmVS7FlagTable::CaseInsensitive},
{"MapExports", "MAPINFO:EXPORTS", "", "true", 0},
{"AssemblyDebug", "ASSEMBLYDEBUG:DISABLE", "", "false", 0},
{"AssemblyDebug", "ASSEMBLYDEBUG", "", "true", 0},

View File

@ -2597,30 +2597,16 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
linkOptions.AddFlag("StackReserveSize", stackVal);
}
if(flags.find("/debug") != flags.npos)
if (this->LocalGenerator->GetVersion() >=
cmGlobalVisualStudioGenerator::VS14)
{
if (this->LocalGenerator->GetVersion() >=
cmGlobalVisualStudioGenerator::VS14)
{
linkOptions.AddFlag("GenerateDebugInformation", "Debug");
}
else
{
linkOptions.AddFlag("GenerateDebugInformation", "true");
}
linkOptions.AddFlag("GenerateDebugInformation", "No");
}
else
{
if (this->LocalGenerator->GetVersion() >=
cmGlobalVisualStudioGenerator::VS14)
{
linkOptions.AddFlag("GenerateDebugInformation", "No");
}
else
{
linkOptions.AddFlag("GenerateDebugInformation", "false");
}
linkOptions.AddFlag("GenerateDebugInformation", "false");
}
std::string pdb = this->GeneratorTarget->GetPDBDirectory(config.c_str());
pdb += "/";
pdb += targetNamePDB;