summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/release/dev/vs-global-properties.rst5
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmIDEFlagTable.h1
-rw-r--r--Source/cmIDEOptions.cxx10
-rw-r--r--Source/cmVS10LinkFlagTable.h3
-rw-r--r--Source/cmVS11LinkFlagTable.h3
-rw-r--r--Source/cmVS12LinkFlagTable.h3
-rw-r--r--Source/cmVS14LinkFlagTable.h3
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx50
9 files changed, 54 insertions, 26 deletions
diff --git a/Help/release/dev/vs-global-properties.rst b/Help/release/dev/vs-global-properties.rst
new file mode 100644
index 0000000..cae49b7
--- /dev/null
+++ b/Help/release/dev/vs-global-properties.rst
@@ -0,0 +1,5 @@
+vs-global-properties
+--------------------
+
+* The :prop_tgt:`VS_GLOBAL_<variable>` target property is now implemented
+ for VS 2010 and above. Previously it worked only in VS 2008 and below.
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index d44f58e..585f6e0 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -1,5 +1,5 @@
# CMake version number components.
set(CMake_VERSION_MAJOR 3)
set(CMake_VERSION_MINOR 4)
-set(CMake_VERSION_PATCH 20160111)
+set(CMake_VERSION_PATCH 20160112)
#set(CMake_VERSION_RC 1)
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..27ae685 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -448,6 +448,32 @@ void cmVisualStudio10TargetGenerator::Generate()
(*this->BuildFileStream) << cmVS10EscapeXML(targetFrameworkVersion)
<< "</TargetFrameworkVersion>\n";
}
+
+ std::vector<std::string> keys = this->GeneratorTarget->GetPropertyKeys();
+ for(std::vector<std::string>::const_iterator keyIt = keys.begin();
+ keyIt != keys.end(); ++keyIt)
+ {
+ static const char* prefix = "VS_GLOBAL_";
+ if(keyIt->find(prefix) != 0)
+ continue;
+ std::string globalKey = keyIt->substr(strlen(prefix));
+ // Skip invalid or separately-handled properties.
+ if(globalKey == "" ||
+ globalKey == "PROJECT_TYPES" ||
+ globalKey == "ROOTNAMESPACE" ||
+ globalKey == "KEYWORD")
+ {
+ continue;
+ }
+ const char* value = this->GeneratorTarget->GetProperty(keyIt->c_str());
+ if (!value)
+ continue;
+ this->WriteString("<", 2);
+ (*this->BuildFileStream) << globalKey << ">"
+ << cmVS10EscapeXML(value)
+ << "</" << globalKey << ">\n";
+ }
+
this->WriteString("</PropertyGroup>\n", 1);
this->WriteString("<Import Project="
"\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n",
@@ -2597,30 +2623,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;