[Cmake-commits] CMake branch, master, updated. v3.10.0-rc3-196-g8c6fa52

Kitware Robot kwrobot at kitware.com
Tue Oct 31 08:15:05 EDT 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  8c6fa52515a0d3ad9190f6f6cb9e00ce564a7012 (commit)
       via  9c2e8cf8a2f9ca169b993d021f3f560e60702e76 (commit)
       via  31336538b845e5ec66234c0708dabd6e43fe10d9 (commit)
       via  89add9b3e6a9d8aef4f63e3e03a8478480d66f11 (commit)
       via  6a4a61d9e1017190f122219681c239b82cfe9390 (commit)
       via  52680d8092bf3c32e3fa27460b22434d58095f27 (commit)
       via  025221df2a84500df2fb9ea6bebaf42baaa79400 (commit)
      from  fd2e6212a66cd443bbf3e5b6e2cfd77ef1fb7b61 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8c6fa52515a0d3ad9190f6f6cb9e00ce564a7012
commit 8c6fa52515a0d3ad9190f6f6cb9e00ce564a7012
Merge: 9c2e8cf 89add9b
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 31 12:13:48 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Oct 31 08:13:52 2017 -0400

    Merge topic '15468-xcode-hide-zero-check-source-group'
    
    89add9b3 Xcode: Do not create ZERO_CHECK source group
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1429


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9c2e8cf8a2f9ca169b993d021f3f560e60702e76
commit 9c2e8cf8a2f9ca169b993d021f3f560e60702e76
Merge: 3133653 025221d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 31 12:11:41 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Oct 31 08:11:49 2017 -0400

    Merge topic 'vs-hlsl-opt-dbg'
    
    025221df VS: Add source file property to set hlsl debug and optimization flags
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1420


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=31336538b845e5ec66234c0708dabd6e43fe10d9
commit 31336538b845e5ec66234c0708dabd6e43fe10d9
Merge: fd2e621 6a4a61d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Oct 31 12:11:01 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Tue Oct 31 08:11:13 2017 -0400

    Merge topic 'minifixes'
    
    6a4a61d9 cmForEachCommand: prevent leakage
    52680d80 cm_codecvt: cleanup superfluous semicolons
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1402


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=89add9b3e6a9d8aef4f63e3e03a8478480d66f11
commit 89add9b3e6a9d8aef4f63e3e03a8478480d66f11
Author:     Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Mon Oct 30 18:39:40 2017 +0100
Commit:     Gregor Jasny <gjasny at googlemail.com>
CommitDate: Mon Oct 30 18:39:40 2017 +0100

    Xcode: Do not create ZERO_CHECK source group
    
    Closes #15468

diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 78943e4..97e461d 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2288,7 +2288,8 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget(
   this->XCodeObjectMap[gtgt] = target;
 
   // Add source files without build rules for editing convenience.
-  if (gtgt->GetType() == cmStateEnums::UTILITY) {
+  if (gtgt->GetType() == cmStateEnums::UTILITY &&
+      gtgt->GetName() != CMAKE_CHECK_BUILD_SYSTEM_TARGET) {
     std::vector<cmSourceFile*> sources;
     if (!gtgt->GetConfigCommonSourceFiles(sources)) {
       return nullptr;
@@ -2705,7 +2706,7 @@ bool cmGlobalXCodeGenerator::CreateGroups(
       generator->GetGeneratorTargets();
     for (auto gtgt : tgts) {
       // Same skipping logic here as in CreateXCodeTargets so that we do not
-      // end up with (empty anyhow) ALL_BUILD and XCODE_DEPEND_HELPER source
+      // end up with (empty anyhow) ZERO_CHECK, install, or test source
       // groups:
       //
       if (gtgt->GetType() == cmStateEnums::GLOBAL_TARGET) {
@@ -2714,6 +2715,9 @@ bool cmGlobalXCodeGenerator::CreateGroups(
       if (gtgt->GetType() == cmStateEnums::INTERFACE_LIBRARY) {
         continue;
       }
+      if (gtgt->GetName() == CMAKE_CHECK_BUILD_SYSTEM_TARGET) {
+        continue;
+      }
 
       // add the soon to be generated Info.plist file as a source for a
       // MACOSX_BUNDLE file

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6a4a61d9e1017190f122219681c239b82cfe9390
commit 6a4a61d9e1017190f122219681c239b82cfe9390
Author:     Matthias Maennich <matthias at maennich.net>
AuthorDate: Mon Oct 9 16:26:31 2017 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Oct 30 09:55:02 2017 -0400

    cmForEachCommand: prevent leakage

diff --git a/Source/cmForEachCommand.cxx b/Source/cmForEachCommand.cxx
index 542a860..df288bd 100644
--- a/Source/cmForEachCommand.cxx
+++ b/Source/cmForEachCommand.cxx
@@ -7,6 +7,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "cmAlgorithms.h"
 #include "cmExecutionStatus.h"
 #include "cmMakefile.h"
 #include "cmSystemTools.h"
@@ -121,7 +122,7 @@ bool cmForEachCommand::InitialPass(std::vector<std::string> const& args,
   }
 
   // create a function blocker
-  cmForEachFunctionBlocker* f = new cmForEachFunctionBlocker(this->Makefile);
+  auto f = cm::make_unique<cmForEachFunctionBlocker>(this->Makefile);
   if (args.size() > 1) {
     if (args[1] == "RANGE") {
       int start = 0;
@@ -175,7 +176,7 @@ bool cmForEachCommand::InitialPass(std::vector<std::string> const& args,
   } else {
     f->Args = args;
   }
-  this->Makefile->AddFunctionBlocker(f);
+  this->Makefile->AddFunctionBlocker(f.release());
 
   return true;
 }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=52680d8092bf3c32e3fa27460b22434d58095f27
commit 52680d8092bf3c32e3fa27460b22434d58095f27
Author:     Matthias Maennich <matthias at maennich.net>
AuthorDate: Thu Oct 5 16:43:35 2017 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Oct 30 09:54:44 2017 -0400

    cm_codecvt: cleanup superfluous semicolons

diff --git a/Source/cm_codecvt.cxx b/Source/cm_codecvt.cxx
index cf55741..6705851 100644
--- a/Source/cm_codecvt.cxx
+++ b/Source/cm_codecvt.cxx
@@ -38,12 +38,14 @@ codecvt::codecvt(Encoding e)
   }
 }
 
-codecvt::~codecvt(){};
+codecvt::~codecvt()
+{
+}
 
 bool codecvt::do_always_noconv() const throw()
 {
   return m_noconv;
-};
+}
 
 std::codecvt_base::result codecvt::do_out(mbstate_t& state, const char* from,
                                           const char* from_end,
@@ -122,7 +124,7 @@ std::codecvt_base::result codecvt::do_out(mbstate_t& state, const char* from,
   static_cast<void>(to_next);
   return std::codecvt_base::noconv;
 #endif
-};
+}
 
 std::codecvt_base::result codecvt::do_unshift(mbstate_t& state, char* to,
                                               char* to_end,
@@ -143,7 +145,7 @@ std::codecvt_base::result codecvt::do_unshift(mbstate_t& state, char* to,
   static_cast<void>(to_end);
   return std::codecvt_base::ok;
 #endif
-};
+}
 
 #if defined(_WIN32)
 std::codecvt_base::result codecvt::Decode(mbstate_t& state, int size,
@@ -235,9 +237,9 @@ void codecvt::BufferPartial(mbstate_t& state, int size,
 int codecvt::do_max_length() const throw()
 {
   return 4;
-};
+}
 
 int codecvt::do_encoding() const throw()
 {
   return 0;
-};
+}

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=025221df2a84500df2fb9ea6bebaf42baaa79400
commit 025221df2a84500df2fb9ea6bebaf42baaa79400
Author:     Jeremiah van Oosten <jpvanoosten at hotmail.com>
AuthorDate: Fri Oct 27 16:59:45 2017 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Oct 30 09:52:10 2017 -0400

    VS: Add source file property to set hlsl debug and optimization flags
    
    Add `VS_SHADER_DISABLE_OPTIMIZATIONS` and `VS_SHADER_ENABLE_DEBUG`
    source file properties to control these settings on `.hlsl` files in the
    VS generator.
    
    Fixes: #17406

diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index dd59a00..13b22f8 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -390,6 +390,8 @@ Properties on Source Files
    /prop_sf/VS_DEPLOYMENT_LOCATION
    /prop_sf/VS_INCLUDE_IN_VSIX
    /prop_sf/VS_RESOURCE_GENERATOR
+   /prop_sf/VS_SHADER_DISABLE_OPTIMIZATIONS
+   /prop_sf/VS_SHADER_ENABLE_DEBUG
    /prop_sf/VS_SHADER_ENTRYPOINT
    /prop_sf/VS_SHADER_FLAGS
    /prop_sf/VS_SHADER_MODEL
diff --git a/Help/prop_sf/VS_SHADER_DISABLE_OPTIMIZATIONS.rst b/Help/prop_sf/VS_SHADER_DISABLE_OPTIMIZATIONS.rst
new file mode 100644
index 0000000..446dd26
--- /dev/null
+++ b/Help/prop_sf/VS_SHADER_DISABLE_OPTIMIZATIONS.rst
@@ -0,0 +1,6 @@
+VS_SHADER_DISABLE_OPTIMIZATIONS
+-------------------------------
+
+Disable compiler optimizations for an ``.hlsl`` source file.  This adds the
+``-Od`` flag to the command line for the FxCompiler tool.  Specify the value
+``true`` for this property to disable compiler optimizations.
diff --git a/Help/prop_sf/VS_SHADER_ENABLE_DEBUG.rst b/Help/prop_sf/VS_SHADER_ENABLE_DEBUG.rst
new file mode 100644
index 0000000..c0e60a3
--- /dev/null
+++ b/Help/prop_sf/VS_SHADER_ENABLE_DEBUG.rst
@@ -0,0 +1,6 @@
+VS_SHADER_ENABLE_DEBUG
+----------------------
+
+Enable debugging information for an ``.hlsl`` source file.  This adds the
+``-Zi`` flag to the command line for the FxCompiler tool.  Specify the value
+``true`` to generate debugging information for the compiled shader.
diff --git a/Help/release/dev/vs-hlsl-opt-dbg.rst b/Help/release/dev/vs-hlsl-opt-dbg.rst
new file mode 100644
index 0000000..8f398ae
--- /dev/null
+++ b/Help/release/dev/vs-hlsl-opt-dbg.rst
@@ -0,0 +1,6 @@
+vs-hlsl-opt-dbg
+---------------
+
+* Source file properties :prop_sf:`VS_SHADER_DISABLE_OPTIMIZATIONS` and
+  :prop_sf:`VS_SHADER_ENABLE_DEBUG` have been added to specify more
+  details of ``.hlsl`` sources with :ref:`Visual Studio Generators`.
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index 0a303b0..1aadf67 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -1602,6 +1602,8 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
   std::string shaderEntryPoint;
   std::string shaderModel;
   std::string shaderAdditionalFlags;
+  std::string shaderDisableOptimizations;
+  std::string shaderEnableDebug;
   std::string outputHeaderFile;
   std::string variableName;
   std::string settingsGenerator;
@@ -1668,6 +1670,16 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
       shaderAdditionalFlags = saf;
       toolHasSettings = true;
     }
+    // Figure out if debug information should be generated
+    if (const char* sed = sf->GetProperty("VS_SHADER_ENABLE_DEBUG")) {
+      shaderEnableDebug = cmSystemTools::IsOn(sed) ? "true" : "false";
+      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";
+      toolHasSettings = true;
+    }
   } else if (ext == "jpg" || ext == "png") {
     tool = "Image";
   } else if (ext == "resw") {
@@ -1810,6 +1822,16 @@ void cmVisualStudio10TargetGenerator::WriteExtraSource(cmSourceFile const* sf)
         this->WriteString("</VariableName>\n", 0);
       }
     }
+    if (!shaderEnableDebug.empty()) {
+      this->WriteString("<EnableDebuggingInformation>", 3);
+      (*this->BuildFileStream) << cmVS10EscapeXML(shaderEnableDebug)
+                               << "</EnableDebuggingInformation>\n";
+    }
+    if (!shaderDisableOptimizations.empty()) {
+      this->WriteString("<DisableOptimizations>", 3);
+      (*this->BuildFileStream) << cmVS10EscapeXML(shaderDisableOptimizations)
+                               << "</DisableOptimizations>\n";
+    }
     if (!shaderAdditionalFlags.empty()) {
       this->WriteString("<AdditionalOptions>", 3);
       (*this->BuildFileStream) << cmVS10EscapeXML(shaderAdditionalFlags)

-----------------------------------------------------------------------

Summary of changes:
 Help/manual/cmake-properties.7.rst               |    2 ++
 Help/prop_sf/VS_SHADER_DISABLE_OPTIMIZATIONS.rst |    6 ++++++
 Help/prop_sf/VS_SHADER_ENABLE_DEBUG.rst          |    6 ++++++
 Help/release/dev/vs-hlsl-opt-dbg.rst             |    6 ++++++
 Source/cmForEachCommand.cxx                      |    5 +++--
 Source/cmGlobalXCodeGenerator.cxx                |    8 ++++++--
 Source/cmVisualStudio10TargetGenerator.cxx       |   22 ++++++++++++++++++++++
 Source/cm_codecvt.cxx                            |   14 ++++++++------
 8 files changed, 59 insertions(+), 10 deletions(-)
 create mode 100644 Help/prop_sf/VS_SHADER_DISABLE_OPTIMIZATIONS.rst
 create mode 100644 Help/prop_sf/VS_SHADER_ENABLE_DEBUG.rst
 create mode 100644 Help/release/dev/vs-hlsl-opt-dbg.rst


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list