summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/CPack/cpack.cxx20
-rw-r--r--Source/Checks/cm_cxx_features.cmake3
-rw-r--r--Source/cmPolicies.h4
-rw-r--r--Source/cmVisualStudio10TargetGenerator.cxx39
5 files changed, 49 insertions, 19 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 12dfdb6..72ae68b 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 11)
-set(CMake_VERSION_PATCH 20180430)
+set(CMake_VERSION_PATCH 20180501)
#set(CMake_VERSION_RC 1)
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index b6ff38b..87ef5b6 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -33,23 +33,25 @@ static const char* cmDocumentationName[][2] = {
};
static const char* cmDocumentationUsage[][2] = {
- { nullptr, " cpack -G <generator> [options]" },
+ // clang-format off
+ { nullptr, " cpack [options]" },
{ nullptr, nullptr }
+ // clang-format on
};
static const char* cmDocumentationOptions[][2] = {
- { "-G <generator>", "Use the specified generator to generate package." },
+ { "-G <generators>", "Override/define CPACK_GENERATOR" },
{ "-C <Configuration>", "Specify the project configuration" },
{ "-D <var>=<value>", "Set a CPack variable." },
- { "--config <config file>", "Specify the config file." },
- { "--verbose,-V", "enable verbose output" },
+ { "--config <configFile>", "Specify the config file." },
+ { "--verbose,-V", "Enable verbose output" },
{ "--trace", "Put underlying cmake scripts in trace mode." },
{ "--trace-expand", "Put underlying cmake scripts in expanded trace mode." },
- { "--debug", "enable debug output (for CPack developers)" },
- { "-P <package name>", "override/define CPACK_PACKAGE_NAME" },
- { "-R <package version>", "override/define CPACK_PACKAGE_VERSION" },
- { "-B <package directory>", "override/define CPACK_PACKAGE_DIRECTORY" },
- { "--vendor <vendor name>", "override/define CPACK_PACKAGE_VENDOR" },
+ { "--debug", "Enable debug output (for CPack developers)" },
+ { "-P <packageName>", "Override/define CPACK_PACKAGE_NAME" },
+ { "-R <packageVersion>", "Override/define CPACK_PACKAGE_VERSION" },
+ { "-B <packageDirectory>", "Override/define CPACK_PACKAGE_DIRECTORY" },
+ { "--vendor <vendorName>", "Override/define CPACK_PACKAGE_VENDOR" },
{ nullptr, nullptr }
};
diff --git a/Source/Checks/cm_cxx_features.cmake b/Source/Checks/cm_cxx_features.cmake
index 2704c40..2a1abba 100644
--- a/Source/Checks/cm_cxx_features.cmake
+++ b/Source/Checks/cm_cxx_features.cmake
@@ -19,6 +19,9 @@ function(cm_check_cxx_feature name)
string(REGEX REPLACE " +0 Warning\\(s\\)" "" check_output "${check_output}")
# Filter out warnings caused by user flags.
string(REGEX REPLACE "[^\n]*warning:[^\n]*-Winvalid-command-line-argument[^\n]*" "" check_output "${check_output}")
+ # Filter out warnings caused by local configuration.
+ string(REGEX REPLACE "[^\n]*warning:[^\n]*directory not found for option[^\n]*" "" check_output "${check_output}")
+ string(REGEX REPLACE "[^\n]*warning:[^\n]*object file compiled with -mlong-branch which is no longer needed[^\n]*" "" check_output "${check_output}")
# If using the feature causes warnings, treat it as broken/unavailable.
if(check_output MATCHES "[Ww]arning")
set(CMake_HAVE_CXX_${FEATURE} OFF CACHE INTERNAL "TRY_COMPILE" FORCE)
diff --git a/Source/cmPolicies.h b/Source/cmPolicies.h
index 9b9ef60..7190c36 100644
--- a/Source/cmPolicies.h
+++ b/Source/cmPolicies.h
@@ -252,9 +252,7 @@ class cmMakefile;
/** \class cmPolicies
* \brief Handles changes in CMake behavior and policies
*
- * See the cmake wiki section on
- * <a href="https://cmake.org/Wiki/CMake/Policies">policies</a>
- * for an overview of this class's purpose
+ * See the cmake-policies(7) manual for an overview of this class's purpose.
*/
class cmPolicies
{
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 6074ae6..5497469 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1691,12 +1691,12 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
}
// Figure out if debug information should be generated
if (const char* sed = sf->GetProperty("VS_SHADER_ENABLE_DEBUG")) {
- shaderEnableDebug = cmSystemTools::IsOn(sed) ? "true" : "false";
+ shaderEnableDebug = sed;
toolHasSettings = true;
}
// Figure out if optimizations should be disabled
if (const char* sdo = sf->GetProperty("VS_SHADER_DISABLE_OPTIMIZATIONS")) {
- shaderDisableOptimizations = cmSystemTools::IsOn(sdo) ? "true" : "false";
+ shaderDisableOptimizations = sdo;
toolHasSettings = true;
}
if (const char* sofn = sf->GetProperty("VS_SHADER_OBJECT_FILE_NAME")) {
@@ -1838,12 +1838,39 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
}
}
if (!shaderEnableDebug.empty()) {
- this->WriteElemEscapeXML("EnableDebuggingInformation", shaderEnableDebug,
- 3);
+ cmGeneratorExpression ge;
+ std::unique_ptr<cmCompiledGeneratorExpression> cge =
+ ge.Parse(shaderEnableDebug);
+
+ for (size_t i = 0; i != this->Configurations.size(); ++i) {
+ const char* enableDebug =
+ cge->Evaluate(this->LocalGenerator, this->Configurations[i]);
+ if (strlen(enableDebug) > 0) {
+ Elem el(*this->BuildFileStream, 3);
+ el.StartElement("EnableDebuggingInformation");
+ el.Attribute("Condition", "'$(Configuration)|$(Platform)'=='" +
+ this->Configurations[i] + "|" + this->Platform + "'");
+ el.Content(cmSystemTools::IsOn(enableDebug) ? "true" : "false");
+ }
+ }
}
if (!shaderDisableOptimizations.empty()) {
- this->WriteElemEscapeXML("DisableOptimizations",
- shaderDisableOptimizations, 3);
+ cmGeneratorExpression ge;
+ std::unique_ptr<cmCompiledGeneratorExpression> cge =
+ ge.Parse(shaderDisableOptimizations);
+
+ for (size_t i = 0; i != this->Configurations.size(); ++i) {
+ const char* disableOptimizations =
+ cge->Evaluate(this->LocalGenerator, this->Configurations[i]);
+ if (strlen(disableOptimizations) > 0) {
+ Elem el(*this->BuildFileStream, 3);
+ el.StartElement("DisableOptimizations");
+ el.Attribute("Condition", "'$(Configuration)|$(Platform)'=='" +
+ this->Configurations[i] + "|" + this->Platform + "'");
+ el.Content(cmSystemTools::IsOn(disableOptimizations) ? "true"
+ : "false");
+ }
+ }
}
if (!shaderObjectFileName.empty()) {
this->WriteElemEscapeXML("ObjectFileOutput", shaderObjectFileName, 3);