Merge topic 'vs-link-debug-property'
b3677b35 VS: Map the link `/debug` to its IDE property c22da7cf VS: Drop unused condition in link debug flag generation 4ca9df8b cmIDEOptions: Add support for case-insensitive flags
This commit is contained in:
commit
b3c10efb08
@ -32,6 +32,7 @@ struct cmIDEFlagTable
|
|||||||
// /NODEFAULTLIB: =>
|
// /NODEFAULTLIB: =>
|
||||||
// IgnoreDefaultLibraryNames)
|
// IgnoreDefaultLibraryNames)
|
||||||
UserFollowing = (1<<5), // expect value in following argument
|
UserFollowing = (1<<5), // expect value in following argument
|
||||||
|
CaseInsensitive = (1<<6), // flag may be any case
|
||||||
|
|
||||||
UserValueIgnored = UserValue | UserIgnored,
|
UserValueIgnored = UserValue | UserIgnored,
|
||||||
UserValueRequired = UserValue | UserRequired
|
UserValueRequired = UserValue | UserRequired
|
||||||
|
@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
#include "cmSystemTools.h"
|
#include "cmSystemTools.h"
|
||||||
|
|
||||||
|
#include <cmsys/String.h>
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmIDEOptions::cmIDEOptions()
|
cmIDEOptions::cmIDEOptions()
|
||||||
{
|
{
|
||||||
@ -104,7 +106,9 @@ bool cmIDEOptions::CheckFlagTable(cmIDEFlagTable const* table,
|
|||||||
// the entry specifies UserRequired we must match only if a
|
// the entry specifies UserRequired we must match only if a
|
||||||
// non-empty value is given.
|
// non-empty value is given.
|
||||||
int n = static_cast<int>(strlen(entry->commandFlag));
|
int n = static_cast<int>(strlen(entry->commandFlag));
|
||||||
if(strncmp(flag+1, entry->commandFlag, n) == 0 &&
|
if((strncmp(flag+1, entry->commandFlag, n) == 0 ||
|
||||||
|
(entry->special & cmIDEFlagTable::CaseInsensitive &&
|
||||||
|
cmsysString_strncasecmp(flag+1, entry->commandFlag, n))) &&
|
||||||
(!(entry->special & cmIDEFlagTable::UserRequired) ||
|
(!(entry->special & cmIDEFlagTable::UserRequired) ||
|
||||||
static_cast<int>(strlen(flag+1)) > n))
|
static_cast<int>(strlen(flag+1)) > n))
|
||||||
{
|
{
|
||||||
@ -112,7 +116,9 @@ bool cmIDEOptions::CheckFlagTable(cmIDEFlagTable const* table,
|
|||||||
entry_found = true;
|
entry_found = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(strcmp(flag+1, entry->commandFlag) == 0)
|
else if(strcmp(flag+1, entry->commandFlag) == 0 ||
|
||||||
|
(entry->special & cmIDEFlagTable::CaseInsensitive &&
|
||||||
|
cmsysString_strcasecmp(flag+1, entry->commandFlag) == 0))
|
||||||
{
|
{
|
||||||
if(entry->special & cmIDEFlagTable::UserFollowing)
|
if(entry->special & cmIDEFlagTable::UserFollowing)
|
||||||
{
|
{
|
||||||
|
@ -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,20 +2597,6 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
|
|||||||
linkOptions.AddFlag("StackReserveSize", stackVal);
|
linkOptions.AddFlag("StackReserveSize", stackVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(linkOptions.IsDebug() || flags.find("/debug") != flags.npos)
|
|
||||||
{
|
|
||||||
if (this->LocalGenerator->GetVersion() >=
|
|
||||||
cmGlobalVisualStudioGenerator::VS14)
|
|
||||||
{
|
|
||||||
linkOptions.AddFlag("GenerateDebugInformation", "Debug");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
linkOptions.AddFlag("GenerateDebugInformation", "true");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (this->LocalGenerator->GetVersion() >=
|
if (this->LocalGenerator->GetVersion() >=
|
||||||
cmGlobalVisualStudioGenerator::VS14)
|
cmGlobalVisualStudioGenerator::VS14)
|
||||||
{
|
{
|
||||||
@ -2620,7 +2606,7 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config)
|
|||||||
{
|
{
|
||||||
linkOptions.AddFlag("GenerateDebugInformation", "false");
|
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…
x
Reference in New Issue
Block a user