diff options
author | Brad King <brad.king@kitware.com> | 2016-01-12 15:22:59 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-01-12 15:22:59 (GMT) |
commit | b3c10efb0885e2ed23a04cbaf967de23d921ffc8 (patch) | |
tree | c2550e4af72815ee2f0e3649c4a52922689d7d46 | |
parent | cd9a59b1993bc7732dae4d683c5864847f36a046 (diff) | |
parent | b3677b35d320cce5d23831ec398d6bb283d1444e (diff) | |
download | CMake-b3c10efb0885e2ed23a04cbaf967de23d921ffc8.zip CMake-b3c10efb0885e2ed23a04cbaf967de23d921ffc8.tar.gz CMake-b3c10efb0885e2ed23a04cbaf967de23d921ffc8.tar.bz2 |
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
-rw-r--r-- | Source/cmIDEFlagTable.h | 1 | ||||
-rw-r--r-- | Source/cmIDEOptions.cxx | 10 | ||||
-rw-r--r-- | Source/cmVS10LinkFlagTable.h | 3 | ||||
-rw-r--r-- | Source/cmVS11LinkFlagTable.h | 3 | ||||
-rw-r--r-- | Source/cmVS12LinkFlagTable.h | 3 | ||||
-rw-r--r-- | Source/cmVS14LinkFlagTable.h | 3 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 24 |
7 files changed, 22 insertions, 25 deletions
diff --git a/Source/cmIDEFlagTable.h b/Source/cmIDEFlagTable.h index d9a045d..adc7763 100644 --- a/Source/cmIDEFlagTable.h +++ b/Source/cmIDEFlagTable.h @@ -32,6 +32,7 @@ struct cmIDEFlagTable // /NODEFAULTLIB: => // IgnoreDefaultLibraryNames) UserFollowing = (1<<5), // expect value in following argument + CaseInsensitive = (1<<6), // flag may be any case UserValueIgnored = UserValue | UserIgnored, UserValueRequired = UserValue | UserRequired diff --git a/Source/cmIDEOptions.cxx b/Source/cmIDEOptions.cxx index 0eb903d..509602f 100644 --- a/Source/cmIDEOptions.cxx +++ b/Source/cmIDEOptions.cxx @@ -13,6 +13,8 @@ #include "cmSystemTools.h" +#include <cmsys/String.h> + //---------------------------------------------------------------------------- cmIDEOptions::cmIDEOptions() { @@ -104,7 +106,9 @@ bool cmIDEOptions::CheckFlagTable(cmIDEFlagTable const* table, // the entry specifies UserRequired we must match only if a // non-empty value is given. 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) || static_cast<int>(strlen(flag+1)) > n)) { @@ -112,7 +116,9 @@ bool cmIDEOptions::CheckFlagTable(cmIDEFlagTable const* table, 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) { diff --git a/Source/cmVS10LinkFlagTable.h b/Source/cmVS10LinkFlagTable.h index f6b758d..dd92329 100644 --- a/Source/cmVS10LinkFlagTable.h +++ b/Source/cmVS10LinkFlagTable.h @@ -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}, diff --git a/Source/cmVS11LinkFlagTable.h b/Source/cmVS11LinkFlagTable.h index 0f641e4..2d6f6c0 100644 --- a/Source/cmVS11LinkFlagTable.h +++ b/Source/cmVS11LinkFlagTable.h @@ -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}, diff --git a/Source/cmVS12LinkFlagTable.h b/Source/cmVS12LinkFlagTable.h index e5a570e..0be5e34 100644 --- a/Source/cmVS12LinkFlagTable.h +++ b/Source/cmVS12LinkFlagTable.h @@ -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}, diff --git a/Source/cmVS14LinkFlagTable.h b/Source/cmVS14LinkFlagTable.h index 6d81d12..1e781e8 100644 --- a/Source/cmVS14LinkFlagTable.h +++ b/Source/cmVS14LinkFlagTable.h @@ -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}, diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 669c785..2120035 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2597,30 +2597,16 @@ cmVisualStudio10TargetGenerator::ComputeLinkOptions(std::string const& config) linkOptions.AddFlag("StackReserveSize", stackVal); } - if(linkOptions.IsDebug() || 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; |