summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Help/release/dev/mingw-clang-compile-features.rst5
-rw-r--r--Help/release/dev/vs-global-properties.rst5
-rw-r--r--Modules/Compiler/Clang-CXX.cmake4
-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
11 files changed, 61 insertions, 28 deletions
diff --git a/Help/release/dev/mingw-clang-compile-features.rst b/Help/release/dev/mingw-clang-compile-features.rst
new file mode 100644
index 0000000..5b1fb96
--- /dev/null
+++ b/Help/release/dev/mingw-clang-compile-features.rst
@@ -0,0 +1,5 @@
+mingw-clang-compile-features
+----------------------------
+
+* The :manual:`Compile Features <cmake-compile-features(7)>` functionality
+ is now aware of features supported by Clang compilers on Windows (MinGW).
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/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake
index 6a0a5e2..dc62711 100644
--- a/Modules/Compiler/Clang-CXX.cmake
+++ b/Modules/Compiler/Clang-CXX.cmake
@@ -6,7 +6,7 @@ if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
endif()
cmake_policy(GET CMP0025 appleClangPolicy)
-if(WIN32 OR (APPLE AND NOT appleClangPolicy STREQUAL NEW))
+if(APPLE AND NOT appleClangPolicy STREQUAL NEW)
return()
endif()
@@ -49,7 +49,7 @@ macro(cmake_record_cxx_compile_features)
endmacro()
set(_result 0)
- if (UNIX AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
+ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4)
_get_clang_features(${CMAKE_CXX14_STANDARD_COMPILE_OPTION} CMAKE_CXX14_COMPILE_FEATURES)
if (_result EQUAL 0)
_get_clang_features(${CMAKE_CXX11_STANDARD_COMPILE_OPTION} CMAKE_CXX11_COMPILE_FEATURES)
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;