[Cmake-commits] CMake branch, master, updated. v3.9.0-rc5-194-g55465be

Kitware Robot kwrobot at kitware.com
Thu Jun 29 09:55: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  55465be8404d37713c4bece1cc20acb3a7165492 (commit)
       via  1ac89a4e06f73a5e460f21866b3b28c2f8af31d9 (commit)
       via  a9b88ffdfccebcbf4c565378722812b19c847bbb (commit)
       via  fe34a5c82b68bbaec8f4aa5604d9cefa4aca2d33 (commit)
       via  690cf2c1b200e0fa3de92ceb0b19c5130569ff81 (commit)
       via  ff3498e76b73cd69fb851ff3acfb4f235dd197de (commit)
       via  610d2fcec04333761e036bfb57f99058102f6362 (commit)
       via  5299141320c7be96e9357ebd457c9a279308248a (commit)
       via  7ba27e364fcf6a941590600d7fb1d304bd462e05 (commit)
       via  ae44496e2b2be3838af193c2ecfc7f3efaf1663a (commit)
       via  27bef1609b8e5aa7a5a8124d8bf3b5f652a163af (commit)
       via  17a397c22a7c7f14aa001f85f64c36428c71414a (commit)
      from  aaa545f867a69d959305c1be455b4a92d0922b1c (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=55465be8404d37713c4bece1cc20acb3a7165492
commit 55465be8404d37713c4bece1cc20acb3a7165492
Merge: 1ac89a4 fe34a5c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jun 29 13:50:21 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Jun 29 09:50:29 2017 -0400

    Merge topic '16961-xctest-scheme'
    
    fe34a5c8 Xcode: Add XCTest support to schema generator
    690cf2c1 Xcode: Prepare schema generator for XCTest
    ff3498e7 XCTest: Speed up test by only enabling C language
    610d2fce XCTest: Use bundle specific generator expressions
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1013


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1ac89a4e06f73a5e460f21866b3b28c2f8af31d9
commit 1ac89a4e06f73a5e460f21866b3b28c2f8af31d9
Merge: a9b88ff 5299141
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jun 29 13:49:20 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Jun 29 09:49:29 2017 -0400

    Merge topic 'deb-on-windows'
    
    52991413 CPackDeb: Enable the DEB generator on Windows
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !979


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a9b88ffdfccebcbf4c565378722812b19c847bbb
commit a9b88ffdfccebcbf4c565378722812b19c847bbb
Merge: aaa545f 7ba27e3
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Jun 29 13:48:52 2017 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Jun 29 09:49:01 2017 -0400

    Merge topic 'vs-link-debug-flags'
    
    7ba27e36 VS: Add v140 and v141 flag table entries for /DEBUG:NONE and /DEBUG:FULL
    ae44496e VS: Fix GenerateDebugInformation values for v140 and v141 toolsets
    27bef160 VS: Fix GenerateDebugInformation flag map text for v141 toolsets
    17a397c2 VS: Split link flag table between v140 and v141 toolsets
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !1002


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe34a5c82b68bbaec8f4aa5604d9cefa4aca2d33
commit fe34a5c82b68bbaec8f4aa5604d9cefa4aca2d33
Author:     Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Wed Jun 28 22:21:01 2017 +0200
Commit:     Gregor Jasny <gjasny at googlemail.com>
CommitDate: Wed Jun 28 22:21:52 2017 +0200

    Xcode: Add XCTest support to schema generator
    
    Closes: #16961

diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 45c1764..44fc7f4 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -3298,6 +3298,31 @@ void cmGlobalXCodeGenerator::OutputXCodeProject(
 void cmGlobalXCodeGenerator::OutputXCodeSharedSchemes(
   const std::string& xcProjDir)
 {
+  // collect all tests for the targets
+  std::map<std::string, cmXCodeScheme::TestObjects> testables;
+
+  for (std::vector<cmXCodeObject*>::const_iterator i =
+         this->XCodeObjects.begin();
+       i != this->XCodeObjects.end(); ++i) {
+    cmXCodeObject* obj = *i;
+    if (obj->GetType() != cmXCodeObject::OBJECT ||
+        obj->GetIsA() != cmXCodeObject::PBXNativeTarget) {
+      continue;
+    }
+
+    if (!obj->GetTarget()->IsXCTestOnApple()) {
+      continue;
+    }
+
+    const char* testee = obj->GetTarget()->GetProperty("XCTEST_TESTEE");
+    if (!testee) {
+      continue;
+    }
+
+    testables[testee].push_back(obj);
+  }
+
+  // generate scheme
   for (std::vector<cmXCodeObject*>::const_iterator i =
          this->XCodeObjects.begin();
        i != this->XCodeObjects.end(); ++i) {
@@ -3305,8 +3330,9 @@ void cmGlobalXCodeGenerator::OutputXCodeSharedSchemes(
     if (obj->GetType() == cmXCodeObject::OBJECT &&
         (obj->GetIsA() == cmXCodeObject::PBXNativeTarget ||
          obj->GetIsA() == cmXCodeObject::PBXAggregateTarget)) {
-      cmXCodeScheme schm(obj, this->CurrentConfigurationTypes,
-                         this->XcodeVersion);
+      const std::string& targetName = obj->GetTarget()->GetName();
+      cmXCodeScheme schm(obj, testables[targetName],
+                         this->CurrentConfigurationTypes, this->XcodeVersion);
       schm.WriteXCodeSharedScheme(xcProjDir,
                                   this->RelativeToSource(xcProjDir.c_str()));
     }
diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx
index d6f8e01..bca39af 100644
--- a/Source/cmXCodeScheme.cxx
+++ b/Source/cmXCodeScheme.cxx
@@ -10,10 +10,11 @@
 #include "cmGeneratorTarget.h"
 #include "cmXMLSafe.h"
 
-cmXCodeScheme::cmXCodeScheme(cmXCodeObject* xcObj,
+cmXCodeScheme::cmXCodeScheme(cmXCodeObject* xcObj, const TestObjects& tests,
                              const std::vector<std::string>& configList,
                              unsigned int xcVersion)
   : Target(xcObj)
+  , Tests(tests)
   , TargetName(xcObj->GetTarget()->GetName())
   , ConfigList(configList)
   , XcodeVersion(xcVersion)
@@ -56,7 +57,7 @@ void cmXCodeScheme::WriteXCodeXCScheme(std::ostream& fout,
   xout.Attribute("version", "1.3");
 
   WriteBuildAction(xout, container);
-  WriteTestAction(xout, FindConfiguration("Debug"));
+  WriteTestAction(xout, FindConfiguration("Debug"), container);
   WriteLaunchAction(xout, FindConfiguration("Debug"), container);
   WriteProfileAction(xout, FindConfiguration("Release"));
   WriteAnalyzeAction(xout, FindConfiguration("Debug"));
@@ -90,7 +91,8 @@ void cmXCodeScheme::WriteBuildAction(cmXMLWriter& xout,
 }
 
 void cmXCodeScheme::WriteTestAction(cmXMLWriter& xout,
-                                    std::string configuration)
+                                    std::string configuration,
+                                    const std::string& container)
 {
   xout.StartElement("TestAction");
   xout.BreakAttributes();
@@ -102,8 +104,22 @@ void cmXCodeScheme::WriteTestAction(cmXMLWriter& xout,
   xout.Attribute("shouldUseLaunchSchemeArgsEnv", "YES");
 
   xout.StartElement("Testables");
+  for (TestObjects::const_iterator it = this->Tests.begin();
+       it != this->Tests.end(); ++it) {
+    xout.StartElement("TestableReference");
+    xout.BreakAttributes();
+    xout.Attribute("skipped", "NO");
+    WriteBuildableReference(xout, *it, container);
+    xout.EndElement(); // TestableReference
+  }
   xout.EndElement();
 
+  if (IsTestable()) {
+    xout.StartElement("MacroExpansion");
+    WriteBuildableReference(xout, this->Target, container);
+    xout.EndElement(); // MacroExpansion
+  }
+
   xout.StartElement("AdditionalOptions");
   xout.EndElement();
 
@@ -213,6 +229,11 @@ std::string cmXCodeScheme::FindConfiguration(const std::string& name)
   return name;
 }
 
+bool cmXCodeScheme::IsTestable() const
+{
+  return !this->Tests.empty() || IsExecutable(this->Target);
+}
+
 bool cmXCodeScheme::IsExecutable(const cmXCodeObject* target)
 {
   cmGeneratorTarget* gt = target->GetTarget();
diff --git a/Source/cmXCodeScheme.h b/Source/cmXCodeScheme.h
index d59f35b..def75b1 100644
--- a/Source/cmXCodeScheme.h
+++ b/Source/cmXCodeScheme.h
@@ -5,6 +5,8 @@
 
 #include "cmConfigure.h" // IWYU pragma: keep
 
+#include <vector>
+
 #include "cmGlobalXCodeGenerator.h"
 #include "cmSystemTools.h"
 #include "cmXCodeObject.h"
@@ -16,7 +18,9 @@
 class cmXCodeScheme
 {
 public:
-  cmXCodeScheme(cmXCodeObject* xcObj,
+  typedef std::vector<const cmXCodeObject*> TestObjects;
+
+  cmXCodeScheme(cmXCodeObject* xcObj, const TestObjects& tests,
                 const std::vector<std::string>& configList,
                 unsigned int xcVersion);
 
@@ -25,6 +29,7 @@ public:
 
 private:
   const cmXCodeObject* const Target;
+  const TestObjects Tests;
   const std::string& TargetName;
   const std::vector<std::string>& ConfigList;
   const unsigned int XcodeVersion;
@@ -32,7 +37,8 @@ private:
   void WriteXCodeXCScheme(std::ostream& fout, const std::string& container);
 
   void WriteBuildAction(cmXMLWriter& xout, const std::string& container);
-  void WriteTestAction(cmXMLWriter& xout, std::string configuration);
+  void WriteTestAction(cmXMLWriter& xout, std::string configuration,
+                       const std::string& container);
   void WriteLaunchAction(cmXMLWriter& xout, std::string configuration,
                          const std::string& container);
   void WriteProfileAction(cmXMLWriter& xout, std::string configuration);
@@ -45,6 +51,8 @@ private:
   std::string WriteVersionString();
   std::string FindConfiguration(const std::string& name);
 
+  bool IsTestable() const;
+
   static bool IsExecutable(const cmXCodeObject* target);
 };
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=690cf2c1b200e0fa3de92ceb0b19c5130569ff81
commit 690cf2c1b200e0fa3de92ceb0b19c5130569ff81
Author:     Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Wed Jun 28 22:04:31 2017 +0200
Commit:     Gregor Jasny <gjasny at googlemail.com>
CommitDate: Wed Jun 28 22:06:49 2017 +0200

    Xcode: Prepare schema generator for XCTest
    
    Issue: #16961

diff --git a/Source/cmXCodeScheme.cxx b/Source/cmXCodeScheme.cxx
index 5c22531..d6f8e01 100644
--- a/Source/cmXCodeScheme.cxx
+++ b/Source/cmXCodeScheme.cxx
@@ -15,8 +15,6 @@ cmXCodeScheme::cmXCodeScheme(cmXCodeObject* xcObj,
                              unsigned int xcVersion)
   : Target(xcObj)
   , TargetName(xcObj->GetTarget()->GetName())
-  , BuildableName(xcObj->GetTarget()->GetFullName())
-  , TargetId(xcObj->GetId())
   , ConfigList(configList)
   , XcodeVersion(xcVersion)
 {
@@ -84,14 +82,7 @@ void cmXCodeScheme::WriteBuildAction(cmXMLWriter& xout,
   xout.Attribute("buildForArchiving", "YES");
   xout.Attribute("buildForAnalyzing", "YES");
 
-  xout.StartElement("BuildableReference");
-  xout.BreakAttributes();
-  xout.Attribute("BuildableIdentifier", "primary");
-  xout.Attribute("BlueprintIdentifier", this->TargetId);
-  xout.Attribute("BuildableName", this->BuildableName);
-  xout.Attribute("BlueprintName", this->TargetName);
-  xout.Attribute("ReferencedContainer", "container:" + container);
-  xout.EndElement();
+  WriteBuildableReference(xout, this->Target, container);
 
   xout.EndElement(); // BuildActionEntry
   xout.EndElement(); // BuildActionEntries
@@ -146,14 +137,7 @@ void cmXCodeScheme::WriteLaunchAction(cmXMLWriter& xout,
     xout.StartElement("MacroExpansion");
   }
 
-  xout.StartElement("BuildableReference");
-  xout.BreakAttributes();
-  xout.Attribute("BuildableIdentifier", "primary");
-  xout.Attribute("BlueprintIdentifier", this->TargetId);
-  xout.Attribute("BuildableName", this->BuildableName);
-  xout.Attribute("BlueprintName", this->TargetName);
-  xout.Attribute("ReferencedContainer", "container:" + container);
-  xout.EndElement();
+  WriteBuildableReference(xout, this->Target, container);
 
   xout.EndElement(); // MacroExpansion
 
@@ -195,6 +179,20 @@ void cmXCodeScheme::WriteArchiveAction(cmXMLWriter& xout,
   xout.EndElement();
 }
 
+void cmXCodeScheme::WriteBuildableReference(cmXMLWriter& xout,
+                                            const cmXCodeObject* xcObj,
+                                            const std::string& container)
+{
+  xout.StartElement("BuildableReference");
+  xout.BreakAttributes();
+  xout.Attribute("BuildableIdentifier", "primary");
+  xout.Attribute("BlueprintIdentifier", xcObj->GetId());
+  xout.Attribute("BuildableName", xcObj->GetTarget()->GetFullName());
+  xout.Attribute("BlueprintName", xcObj->GetTarget()->GetName());
+  xout.Attribute("ReferencedContainer", "container:" + container);
+  xout.EndElement();
+}
+
 std::string cmXCodeScheme::WriteVersionString()
 {
   std::ostringstream v;
diff --git a/Source/cmXCodeScheme.h b/Source/cmXCodeScheme.h
index 379afed..d59f35b 100644
--- a/Source/cmXCodeScheme.h
+++ b/Source/cmXCodeScheme.h
@@ -26,8 +26,6 @@ public:
 private:
   const cmXCodeObject* const Target;
   const std::string& TargetName;
-  const std::string BuildableName;
-  const std::string& TargetId;
   const std::vector<std::string>& ConfigList;
   const unsigned int XcodeVersion;
 
@@ -41,6 +39,9 @@ private:
   void WriteAnalyzeAction(cmXMLWriter& xout, std::string configuration);
   void WriteArchiveAction(cmXMLWriter& xout, std::string configuration);
 
+  void WriteBuildableReference(cmXMLWriter& xout, const cmXCodeObject* xcObj,
+                               const std::string& container);
+
   std::string WriteVersionString();
   std::string FindConfiguration(const std::string& name);
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ff3498e76b73cd69fb851ff3acfb4f235dd197de
commit ff3498e76b73cd69fb851ff3acfb4f235dd197de
Author:     Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Wed Jun 28 22:00:36 2017 +0200
Commit:     Gregor Jasny <gjasny at googlemail.com>
CommitDate: Wed Jun 28 22:00:36 2017 +0200

    XCTest: Speed up test by only enabling C language

diff --git a/Tests/XCTest/CMakeLists.txt b/Tests/XCTest/CMakeLists.txt
index d40c40e..d0b07ea 100644
--- a/Tests/XCTest/CMakeLists.txt
+++ b/Tests/XCTest/CMakeLists.txt
@@ -1,5 +1,5 @@
 cmake_minimum_required(VERSION 3.1)
-project(XCTest)
+project(XCTest C)
 enable_testing()
 
 find_package(XCTest REQUIRED)

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=610d2fcec04333761e036bfb57f99058102f6362
commit 610d2fcec04333761e036bfb57f99058102f6362
Author:     Gregor Jasny <gjasny at googlemail.com>
AuthorDate: Wed Jun 28 21:59:48 2017 +0200
Commit:     Gregor Jasny <gjasny at googlemail.com>
CommitDate: Wed Jun 28 21:59:48 2017 +0200

    XCTest: Use bundle specific generator expressions

diff --git a/Modules/FindXCTest.cmake b/Modules/FindXCTest.cmake
index ffdf677..8497336 100644
--- a/Modules/FindXCTest.cmake
+++ b/Modules/FindXCTest.cmake
@@ -136,7 +136,7 @@ function(xctest_add_bundle target testee)
         XCODE_ATTRIBUTE_TEST_HOST "$<TARGET_FILE:${testee}>")
       if(NOT XCODE_VERSION VERSION_LESS 7.3)
         set_target_properties(${target} PROPERTIES
-          LIBRARY_OUTPUT_DIRECTORY "$<TARGET_FILE_DIR:${testee}>/../PlugIns")
+          LIBRARY_OUTPUT_DIRECTORY "$<TARGET_BUNDLE_CONTENT_DIR:${testee}>/PlugIns")
       endif()
     else(XCODE)
       target_link_libraries(${target}
@@ -183,7 +183,7 @@ function(xctest_add_test name bundle)
 
   add_test(
     NAME ${name}
-    COMMAND ${XCTest_EXECUTABLE} $<TARGET_LINKER_FILE_DIR:${bundle}>/../..)
+    COMMAND ${XCTest_EXECUTABLE} $<TARGET_BUNDLE_DIR:${bundle}>)
 
   # point loader to testee in case rpath is disabled
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5299141320c7be96e9357ebd457c9a279308248a
commit 5299141320c7be96e9357ebd457c9a279308248a
Author:     Nils Gladitz <nilsgladitz at gmail.com>
AuthorDate: Sat Jun 17 18:49:33 2017 +0200
Commit:     Nils Gladitz <nilsgladitz at gmail.com>
CommitDate: Wed Jun 28 19:55:12 2017 +0200

    CPackDeb: Enable the DEB generator on Windows
    
    While some features require external Unix tools the
    generator is mostly portable.
    
    By enabling it on Windows it can be used for cross platform
    packaging.

diff --git a/Help/release/dev/deb-on-windows.rst b/Help/release/dev/deb-on-windows.rst
new file mode 100644
index 0000000..b307720
--- /dev/null
+++ b/Help/release/dev/deb-on-windows.rst
@@ -0,0 +1,7 @@
+deb-on-windows
+--------------
+
+* The CPack ``DEB`` generator, configured by the :module:`CPackDeb` module,
+  was enabled on Windows.  While not fully featured (due to the lack of
+  external UNIX tools) this will allow building basic cross-platform Debian
+  packages.
diff --git a/Modules/CPackDeb.cmake b/Modules/CPackDeb.cmake
index ddf8b23..daba7d5 100644
--- a/Modules/CPackDeb.cmake
+++ b/Modules/CPackDeb.cmake
@@ -497,6 +497,16 @@
 #
 #    This value is not interpreted. It is possible to pass an optional
 #    revision number of the referenced source package as well.
+#
+# Building Debian packages on Windows
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+#
+# To communicate UNIX file permissions from the install stage
+# to the CPack DEB generator the "cmake_mode_t" NTFS
+# alternate data stream (ADT) is used.
+#
+# When a filesystem without ADT support is used only owner read/write
+# permissions can be preserved.
 
 # CPack script for creating Debian package
 # Author: Mathieu Malaterre
@@ -507,10 +517,6 @@ if(CMAKE_BINARY_DIR)
   message(FATAL_ERROR "CPackDeb.cmake may only be used by CPack internally.")
 endif()
 
-if(NOT UNIX)
-  message(FATAL_ERROR "CPackDeb.cmake may only be used under UNIX.")
-endif()
-
 function(cpack_deb_variable_fallback OUTPUT_VAR_NAME)
   set(FALLBACK_VAR_NAMES ${ARGN})
 
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 1878b8a..2156e3f 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -874,6 +874,7 @@ set(CPACK_SRCS
   CPack/cmCPackTarCompressGenerator.cxx
   CPack/cmCPackZIPGenerator.cxx
   CPack/cmCPack7zGenerator.cxx
+  CPack/cmCPackDebGenerator.cxx
   )
 # CPack IFW generator
 set(CPACK_SRCS ${CPACK_SRCS}
@@ -900,7 +901,6 @@ option(CPACK_ENABLE_FREEBSD_PKG "Add FreeBSD pkg(8) generator to CPack." OFF)
 
 if(UNIX)
   set(CPACK_SRCS ${CPACK_SRCS}
-    CPack/cmCPackDebGenerator.cxx
     CPack/cmCPackRPMGenerator.cxx
     )
 
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index af54fce..00d017e 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -479,6 +479,25 @@ int cmCPackDebGenerator::createDeb()
       cmCPackLogger(cmCPackLog::LOG_DEBUG, "RELATIVEDIR: \""
                       << relativeDir << "\"" << std::endl);
 
+#ifdef WIN32
+      std::string mode_t_adt_filename = *fileIt + ":cmake_mode_t";
+      cmsys::ifstream permissionStream(mode_t_adt_filename.c_str());
+
+      mode_t permissions = 0;
+
+      if (permissionStream) {
+        permissionStream >> std::oct >> permissions;
+      }
+
+      if (permissions != 0) {
+        data_tar.SetPermissions(permissions);
+      } else if (cmSystemTools::FileIsDirectory(*fileIt)) {
+        data_tar.SetPermissions(0755);
+      } else {
+        data_tar.ClearPermissions();
+      }
+#endif
+
       // do not recurse because the loop will do it
       if (!data_tar.Add(*fileIt, topLevelLength, ".", false)) {
         cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem adding file to tar:"
@@ -553,8 +572,8 @@ int cmCPackDebGenerator::createDeb()
     and
     https://lintian.debian.org/tags/control-file-has-bad-permissions.html
     */
-    const mode_t permission644 = S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH;
-    const mode_t permissionExecute = S_IXUSR | S_IXGRP | S_IXOTH;
+    const mode_t permission644 = 0644;
+    const mode_t permissionExecute = 0111;
     const mode_t permission755 = permission644 | permissionExecute;
 
     // for md5sum and control (that we have generated here), we use 644
@@ -831,7 +850,7 @@ static int copy_ar(CF* cfp, off_t size)
                        ? static_cast<size_t>(sz)
                        : sizeof(buf),
                      from)) > 0) {
-    sz -= nr;
+    sz -= static_cast<off_t>(nr);
     for (size_t off = 0; off < nr; nr -= off, off += nw) {
       if ((nw = fwrite(buf + off, 1, nr, to)) < nr) {
         return -1;
@@ -854,7 +873,6 @@ static int copy_ar(CF* cfp, off_t size)
 static int put_arobj(CF* cfp, struct stat* sb)
 {
   int result = 0;
-  struct ar_hdr* hdr;
 
   /* If passed an sb structure, reading a file from disk.  Get stat(2)
    * information, build a name and construct a header.  (Files are named
@@ -873,7 +891,7 @@ static int put_arobj(CF* cfp, struct stat* sb)
   if (gid > USHRT_MAX) {
     gid = USHRT_MAX;
   }
-  if (lname > sizeof(hdr->ar_name) || strchr(name, ' ')) {
+  if (lname > sizeof(ar_hdr().ar_name) || strchr(name, ' ')) {
     (void)sprintf(ar_hb, HDR1, AR_EFMT1, (int)lname, (long int)sb->st_mtime,
                   (unsigned)uid, (unsigned)gid, (unsigned)sb->st_mode,
                   (long long)sb->st_size + lname, ARFMAG);
diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx
index f135059..834913d 100644
--- a/Source/CPack/cmCPackGeneratorFactory.cxx
+++ b/Source/CPack/cmCPackGeneratorFactory.cxx
@@ -12,6 +12,7 @@
 #ifdef HAVE_FREEBSD_PKG
 #include "cmCPackFreeBSDGenerator.h"
 #endif
+#include "cmCPackDebGenerator.h"
 #include "cmCPackGenerator.h"
 #include "cmCPackLog.h"
 #include "cmCPackNSISGenerator.h"
@@ -37,7 +38,6 @@
 
 #if !defined(_WIN32) && !defined(__QNXNTO__) && !defined(__BEOS__) &&         \
   !defined(__HAIKU__)
-#include "cmCPackDebGenerator.h"
 #include "cmCPackRPMGenerator.h"
 #endif
 
@@ -102,6 +102,10 @@ cmCPackGeneratorFactory::cmCPackGeneratorFactory()
     this->RegisterGenerator("TZ", "Tar Compress compression",
                             cmCPackTarCompressGenerator::CreateGenerator);
   }
+  if (cmCPackDebGenerator::CanGenerate()) {
+    this->RegisterGenerator("DEB", "Debian packages",
+                            cmCPackDebGenerator::CreateGenerator);
+  }
 #ifdef __APPLE__
   if (cmCPackDragNDropGenerator::CanGenerate()) {
     this->RegisterGenerator("DragNDrop", "Mac OSX Drag And Drop",
@@ -126,10 +130,6 @@ cmCPackGeneratorFactory::cmCPackGeneratorFactory()
 #endif
 #if !defined(_WIN32) && !defined(__QNXNTO__) && !defined(__BEOS__) &&         \
   !defined(__HAIKU__)
-  if (cmCPackDebGenerator::CanGenerate()) {
-    this->RegisterGenerator("DEB", "Debian packages",
-                            cmCPackDebGenerator::CreateGenerator);
-  }
   if (cmCPackRPMGenerator::CanGenerate()) {
     this->RegisterGenerator("RPM", "RPM packages",
                             cmCPackRPMGenerator::CreateGenerator);
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 5777fb2..b769a56 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -55,14 +55,14 @@ class cmSystemToolsFileTime;
 static mode_t mode_owner_read = S_IREAD;
 static mode_t mode_owner_write = S_IWRITE;
 static mode_t mode_owner_execute = S_IEXEC;
-static mode_t mode_group_read = 0;
-static mode_t mode_group_write = 0;
-static mode_t mode_group_execute = 0;
-static mode_t mode_world_read = 0;
-static mode_t mode_world_write = 0;
-static mode_t mode_world_execute = 0;
-static mode_t mode_setuid = 0;
-static mode_t mode_setgid = 0;
+static mode_t mode_group_read = 040;
+static mode_t mode_group_write = 020;
+static mode_t mode_group_execute = 010;
+static mode_t mode_world_read = 04;
+static mode_t mode_world_write = 02;
+static mode_t mode_world_execute = 01;
+static mode_t mode_setuid = 04000;
+static mode_t mode_setgid = 02000;
 #else
 static mode_t mode_owner_read = S_IRUSR;
 static mode_t mode_owner_write = S_IWUSR;
@@ -1076,11 +1076,26 @@ protected:
 
   bool SetPermissions(const char* toFile, mode_t permissions)
   {
-    if (permissions && !cmSystemTools::SetPermissions(toFile, permissions)) {
-      std::ostringstream e;
-      e << this->Name << " cannot set permissions on \"" << toFile << "\"";
-      this->FileCommand->SetError(e.str());
-      return false;
+    if (permissions) {
+#ifdef WIN32
+      if (Makefile->IsOn("CMAKE_CROSSCOMPILING")) {
+        std::string mode_t_adt_filename =
+          std::string(toFile) + ":cmake_mode_t";
+
+        cmsys::ofstream permissionStream(mode_t_adt_filename.c_str());
+
+        if (permissionStream) {
+          permissionStream << std::oct << permissions << std::endl;
+        }
+      }
+#endif
+
+      if (!cmSystemTools::SetPermissions(toFile, permissions)) {
+        std::ostringstream e;
+        e << this->Name << " cannot set permissions on \"" << toFile << "\"";
+        this->FileCommand->SetError(e.str());
+        return false;
+      }
     }
     return true;
   }
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 8e00303..9049a42 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -451,6 +451,19 @@ void cmLocalGenerator::GenerateInstallRules()
     /* clang-format on */
   }
 
+  // Copy cmake cross compile state to install code.
+  if (const char* crosscompiling =
+        this->Makefile->GetDefinition("CMAKE_CROSSCOMPILING")) {
+    /* clang-format off */
+    fout <<
+      "# Is this installation the result of a crosscompile?\n"
+      "if(NOT DEFINED CMAKE_CROSSCOMPILING)\n"
+      "  set(CMAKE_CROSSCOMPILING \"" << crosscompiling << "\")\n"
+      "endif()\n"
+      "\n";
+    /* clang-format on */
+  }
+
   // Ask each install generator to write its code.
   std::vector<cmInstallGenerator*> const& installers =
     this->Makefile->GetInstallGenerators();
diff --git a/Source/cm_sys_stat.h b/Source/cm_sys_stat.h
index 26e4baa..796f027 100644
--- a/Source/cm_sys_stat.h
+++ b/Source/cm_sys_stat.h
@@ -7,6 +7,11 @@
 typedef unsigned short mode_t;
 #endif
 
+#if defined(WIN32)
+typedef unsigned short uid_t;
+typedef unsigned short gid_t;
+#endif
+
 #include <sys/types.h>
 // include sys/stat.h after sys/types.h
 #include <sys/stat.h>

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ba27e364fcf6a941590600d7fb1d304bd462e05
commit 7ba27e364fcf6a941590600d7fb1d304bd462e05
Author:     Ian Hojnicki <nullref at live.com>
AuthorDate: Thu Jun 22 16:37:05 2017 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jun 28 08:55:40 2017 -0400

    VS: Add v140 and v141 flag table entries for /DEBUG:NONE and /DEBUG:FULL

diff --git a/Source/cmVS140LinkFlagTable.h b/Source/cmVS140LinkFlagTable.h
index 613541c..ceb1d78 100644
--- a/Source/cmVS140LinkFlagTable.h
+++ b/Source/cmVS140LinkFlagTable.h
@@ -38,6 +38,11 @@ static cmVS7FlagTable cmVS140LinkFlagTable[] = {
   { "GenerateDebugInformation", "DEBUG:FASTLINK",
     "Optimize for faster linking", "DebugFastLink",
     cmVS7FlagTable::CaseInsensitive },
+  { "GenerateDebugInformation", "DEBUG:FULL", "Optimize for debugging", "true",
+    cmVS7FlagTable::CaseInsensitive },
+  { "GenerateDebugInformation", "DEBUG:NONE",
+    "Produces no debugging information", "false",
+    cmVS7FlagTable::CaseInsensitive },
   { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "true",
     cmVS7FlagTable::CaseInsensitive },
 
diff --git a/Source/cmVS141LinkFlagTable.h b/Source/cmVS141LinkFlagTable.h
index ff0c1da..d7faf81 100644
--- a/Source/cmVS141LinkFlagTable.h
+++ b/Source/cmVS141LinkFlagTable.h
@@ -38,6 +38,12 @@ static cmVS7FlagTable cmVS141LinkFlagTable[] = {
   { "GenerateDebugInformation", "DEBUG:FASTLINK",
     "Generate Debug Information optimized for faster links", "DebugFastLink",
     cmVS7FlagTable::CaseInsensitive },
+  { "GenerateDebugInformation", "DEBUG:FULL",
+    "Generate Debug Information optimized for sharing and publishing",
+    "DebugFull", cmVS7FlagTable::CaseInsensitive },
+  { "GenerateDebugInformation", "DEBUG:NONE",
+    "Produces no debugging information", "false",
+    cmVS7FlagTable::CaseInsensitive },
   { "GenerateDebugInformation", "DEBUG", "Generate Debug Information", "true",
     cmVS7FlagTable::CaseInsensitive },
 

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ae44496e2b2be3838af193c2ecfc7f3efaf1663a
commit ae44496e2b2be3838af193c2ecfc7f3efaf1663a
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue Jun 27 15:58:39 2017 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jun 28 08:55:40 2017 -0400

    VS: Fix GenerateDebugInformation values for v140 and v141 toolsets
    
    When VS 2015 was first released, its new v140 toolset came with a
    `link.xml` file that changed the `GenerateDebugInformation` boolean
    (`false` and `true`) value from earlier toolsets to an enumeration
    consisting of the possible values `No`, `Debug`, and `DebugFastLink`.
    
    We first adapted to this in commit v3.4.2~2^2 (VS: Fix VS 2015 .vcxproj
    file value for GenerateDebugInformation, 2016-01-08), but that broke
    older toolsets that still expected the boolean.  Then commit
    v3.6.0-rc1~295^2~1 (VS: Fix VS 2015 .vcxproj debug setting for older
    toolsets, 2016-02-24) added a hack to fix up the value based on the
    toolset in use.  Several follow-up commits fixed this for more older
    toolsets because our flag table was at the time based on the generator
    in use rather than the toolset in use.
    
    Since commit v3.8.0-rc1~396^2 (VS: Choose flag map based on the toolset
    name, 2016-10-17) we use a flag table based on the toolset, so the fixup
    hack should not be needed.  We had to keep it around only due to our
    default value for GenerateDebugInformation (`false` or `No`) still being
    based on the generator instead of the toolset.
    
    A VS 2015 update was released that changed the v140 toolset `link.xml`
    file back to using `false` and `true` for the `GenerateDebugInformation`
    enumeration variants previously known as `No` and `Debug`.  In order to
    know which pair to use, we need to parse the `link.xml` file for the
    current toolset.
    
    Switch back to using `false` and `true` unconditionally in our
    `GenerateDebugInformation` flag table entries and default value.  With
    that plus the toolset-based flag table, we now get incorrect values for
    `GenerateDebugInformation` only when using a v140 toolset from an older
    VS 2015 installation.  Detect this case by parsing `link.xml` and add
    special logic to convert `false` and `true` to `No` and `Debug` to
    satisfy the older toolset specification.
    
    Inspired-by: Ian Hojnicki <nullref at live.com>
    Fixes: #17020

diff --git a/Source/cmGlobalVisualStudio10Generator.cxx b/Source/cmGlobalVisualStudio10Generator.cxx
index 0e02b0a..e3835ff 100644
--- a/Source/cmGlobalVisualStudio10Generator.cxx
+++ b/Source/cmGlobalVisualStudio10Generator.cxx
@@ -130,6 +130,7 @@ cmGlobalVisualStudio10Generator::cmGlobalVisualStudio10Generator(
   this->DefaultNasmFlagTable = cmVS10NASMFlagTable;
   this->DefaultRcFlagTable = cmVS10RCFlagTable;
   this->Version = VS10;
+  this->PlatformToolsetNeedsDebugEnum = false;
 }
 
 bool cmGlobalVisualStudio10Generator::MatchesGeneratorName(
@@ -195,6 +196,24 @@ bool cmGlobalVisualStudio10Generator::SetGeneratorToolset(
     return false;
   }
 
+  if (cmHasLiteralPrefix(this->GetPlatformToolsetString(), "v140")) {
+    // The GenerateDebugInformation link setting for the v140 toolset
+    // in VS 2015 was originally an enum with "No" and "Debug" values,
+    // differing from the "false" and "true" values used in older toolsets.
+    // A VS 2015 update changed it back.  Parse the "link.xml" file to
+    // discover which one we need.
+    std::string const link_xml = this->VCTargetsPath + "/1033/link.xml";
+    cmsys::ifstream fin(link_xml.c_str());
+    std::string line;
+    while (fin && cmSystemTools::GetLineFromStream(fin, line)) {
+      if (line.find(" Switch=\"DEBUG\" ") != std::string::npos) {
+        this->PlatformToolsetNeedsDebugEnum =
+          line.find(" Name=\"Debug\" ") != std::string::npos;
+        break;
+      }
+    }
+  }
+
   if (this->GeneratorToolsetCuda.empty()) {
     // Find the highest available version of the CUDA tools.
     std::vector<std::string> cudaTools;
diff --git a/Source/cmGlobalVisualStudio10Generator.h b/Source/cmGlobalVisualStudio10Generator.h
index 20f992a..4a5c245 100644
--- a/Source/cmGlobalVisualStudio10Generator.h
+++ b/Source/cmGlobalVisualStudio10Generator.h
@@ -59,6 +59,13 @@ public:
   const char* GetPlatformToolsetCuda() const;
   std::string const& GetPlatformToolsetCudaString() const;
 
+  /** Return whether we need to use No/Debug instead of false/true
+      for GenerateDebugInformation.  */
+  bool GetPlatformToolsetNeedsDebugEnum() const
+  {
+    return this->PlatformToolsetNeedsDebugEnum;
+  }
+
   /** Return the CMAKE_SYSTEM_NAME.  */
   std::string const& GetSystemName() const { return this->SystemName; }
 
@@ -169,6 +176,8 @@ private:
   virtual std::string FindDevEnvCommand();
   virtual std::string GetVSMakeProgram() { return this->GetMSBuildCommand(); }
 
+  bool PlatformToolsetNeedsDebugEnum;
+
   bool ParseGeneratorToolset(std::string const& ts, cmMakefile* mf);
 
   std::string VCTargetsPath;
diff --git a/Source/cmVS140LinkFlagTable.h b/Source/cmVS140LinkFlagTable.h
index 618087a..613541c 100644
--- a/Source/cmVS140LinkFlagTable.h
+++ b/Source/cmVS140LinkFlagTable.h
@@ -38,7 +38,7 @@ static cmVS7FlagTable cmVS140LinkFlagTable[] = {
   { "GenerateDebugInformation", "DEBUG:FASTLINK",
     "Optimize for faster linking", "DebugFastLink",
     cmVS7FlagTable::CaseInsensitive },
-  { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "Debug",
+  { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "true",
     cmVS7FlagTable::CaseInsensitive },
 
   { "SubSystem", "", "Not Set", "NotSet", 0 },
diff --git a/Source/cmVS141LinkFlagTable.h b/Source/cmVS141LinkFlagTable.h
index e707b90..ff0c1da 100644
--- a/Source/cmVS141LinkFlagTable.h
+++ b/Source/cmVS141LinkFlagTable.h
@@ -38,7 +38,7 @@ static cmVS7FlagTable cmVS141LinkFlagTable[] = {
   { "GenerateDebugInformation", "DEBUG:FASTLINK",
     "Generate Debug Information optimized for faster links", "DebugFastLink",
     cmVS7FlagTable::CaseInsensitive },
-  { "GenerateDebugInformation", "DEBUG", "Generate Debug Information", "Debug",
+  { "GenerateDebugInformation", "DEBUG", "Generate Debug Information", "true",
     cmVS7FlagTable::CaseInsensitive },
 
   { "SubSystem", "", "Not Set", "NotSet", 0 },
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx
index de1f5b0..88fa19c 100644
--- a/Source/cmVisualStudio10TargetGenerator.cxx
+++ b/Source/cmVisualStudio10TargetGenerator.cxx
@@ -17,8 +17,6 @@
 
 #include "cm_auto_ptr.hxx"
 
-static std::string const kWINDOWS_7_1_SDK = "Windows7.1SDK";
-
 static std::string cmVS10EscapeXML(std::string arg)
 {
   cmSystemTools::ReplaceString(arg, "&", "&");
@@ -3130,12 +3128,7 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions(
       linkOptions.AddFlag("StackReserveSize", stackVal);
     }
 
-    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 += "/";
@@ -3182,26 +3175,14 @@ bool cmVisualStudio10TargetGenerator::ComputeLinkOptions(
                            "%(IgnoreSpecificDefaultLibraries)");
   }
 
-  // Hack to fix flag version selection in a common use case.
-  // FIXME: Select flag table based on toolset instead of VS version.
-  if (this->LocalGenerator->GetVersion() >=
-      cmGlobalVisualStudioGenerator::VS14) {
-    const char* toolset = gg->GetPlatformToolset();
-    if (toolset &&
-        (toolset == kWINDOWS_7_1_SDK || /* clang-format please break here */
-         cmHasLiteralPrefix(toolset, "v80") ||
-         cmHasLiteralPrefix(toolset, "v90") ||
-         cmHasLiteralPrefix(toolset, "v100") ||
-         cmHasLiteralPrefix(toolset, "v110") ||
-         cmHasLiteralPrefix(toolset, "v120"))) {
-      if (const char* debug =
-            linkOptions.GetFlag("GenerateDebugInformation")) {
-        // Convert value from enumeration back to boolean for older toolsets.
-        if (strcmp(debug, "No") == 0) {
-          linkOptions.AddFlag("GenerateDebugInformation", "false");
-        } else if (strcmp(debug, "Debug") == 0) {
-          linkOptions.AddFlag("GenerateDebugInformation", "true");
-        }
+  // VS 2015 without all updates has a v140 toolset whose
+  // GenerateDebugInformation expects No/Debug instead of false/true.
+  if (gg->GetPlatformToolsetNeedsDebugEnum()) {
+    if (const char* debug = linkOptions.GetFlag("GenerateDebugInformation")) {
+      if (strcmp(debug, "false") == 0) {
+        linkOptions.AddFlag("GenerateDebugInformation", "No");
+      } else if (strcmp(debug, "true") == 0) {
+        linkOptions.AddFlag("GenerateDebugInformation", "Debug");
       }
     }
   }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=27bef1609b8e5aa7a5a8124d8bf3b5f652a163af
commit 27bef1609b8e5aa7a5a8124d8bf3b5f652a163af
Author:     Ian Hojnicki <nullref at live.com>
AuthorDate: Thu Jun 22 16:37:05 2017 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jun 28 08:55:40 2017 -0400

    VS: Fix GenerateDebugInformation flag map text for v141 toolsets
    
    Update the help text to match that from v141's link.xml file.

diff --git a/Source/cmVS141LinkFlagTable.h b/Source/cmVS141LinkFlagTable.h
index ec5dc2a..e707b90 100644
--- a/Source/cmVS141LinkFlagTable.h
+++ b/Source/cmVS141LinkFlagTable.h
@@ -36,9 +36,9 @@ static cmVS7FlagTable cmVS141LinkFlagTable[] = {
     "requireAdministrator", "RequireAdministrator", 0 },
 
   { "GenerateDebugInformation", "DEBUG:FASTLINK",
-    "Optimize for faster linking", "DebugFastLink",
+    "Generate Debug Information optimized for faster links", "DebugFastLink",
     cmVS7FlagTable::CaseInsensitive },
-  { "GenerateDebugInformation", "DEBUG", "Optimize for debugging", "Debug",
+  { "GenerateDebugInformation", "DEBUG", "Generate Debug Information", "Debug",
     cmVS7FlagTable::CaseInsensitive },
 
   { "SubSystem", "", "Not Set", "NotSet", 0 },

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=17a397c22a7c7f14aa001f85f64c36428c71414a
commit 17a397c22a7c7f14aa001f85f64c36428c71414a
Author:     Ian Hojnicki <nullref at live.com>
AuthorDate: Thu Jun 22 16:37:05 2017 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed Jun 28 08:55:40 2017 -0400

    VS: Split link flag table between v140 and v141 toolsets

diff --git a/Source/cmGlobalVisualStudio14Generator.cxx b/Source/cmGlobalVisualStudio14Generator.cxx
index df086d3..c8cf02c 100644
--- a/Source/cmGlobalVisualStudio14Generator.cxx
+++ b/Source/cmGlobalVisualStudio14Generator.cxx
@@ -8,8 +8,8 @@
 #include "cmMakefile.h"
 #include "cmVS140CLFlagTable.h"
 #include "cmVS140CSharpFlagTable.h"
+#include "cmVS140LinkFlagTable.h"
 #include "cmVS14LibFlagTable.h"
-#include "cmVS14LinkFlagTable.h"
 #include "cmVS14MASMFlagTable.h"
 #include "cmVS14RCFlagTable.h"
 
@@ -93,7 +93,7 @@ cmGlobalVisualStudio14Generator::cmGlobalVisualStudio14Generator(
   this->DefaultClFlagTable = cmVS140CLFlagTable;
   this->DefaultCSharpFlagTable = cmVS140CSharpFlagTable;
   this->DefaultLibFlagTable = cmVS14LibFlagTable;
-  this->DefaultLinkFlagTable = cmVS14LinkFlagTable;
+  this->DefaultLinkFlagTable = cmVS140LinkFlagTable;
   this->DefaultMasmFlagTable = cmVS14MASMFlagTable;
   this->DefaultRcFlagTable = cmVS14RCFlagTable;
   this->Version = VS14;
diff --git a/Source/cmGlobalVisualStudio15Generator.cxx b/Source/cmGlobalVisualStudio15Generator.cxx
index da2bf8c..ce1ba00 100644
--- a/Source/cmGlobalVisualStudio15Generator.cxx
+++ b/Source/cmGlobalVisualStudio15Generator.cxx
@@ -8,6 +8,7 @@
 #include "cmMakefile.h"
 #include "cmVS141CLFlagTable.h"
 #include "cmVS141CSharpFlagTable.h"
+#include "cmVS141LinkFlagTable.h"
 #include "cmVSSetupHelper.h"
 
 static const char vs15generatorName[] = "Visual Studio 15 2017";
@@ -85,6 +86,7 @@ cmGlobalVisualStudio15Generator::cmGlobalVisualStudio15Generator(
   this->DefaultPlatformToolset = "v141";
   this->DefaultClFlagTable = cmVS141CLFlagTable;
   this->DefaultCSharpFlagTable = cmVS141CSharpFlagTable;
+  this->DefaultLinkFlagTable = cmVS141LinkFlagTable;
   this->Version = VS15;
 }
 
diff --git a/Source/cmVS14LinkFlagTable.h b/Source/cmVS140LinkFlagTable.h
similarity index 99%
copy from Source/cmVS14LinkFlagTable.h
copy to Source/cmVS140LinkFlagTable.h
index 596f880..618087a 100644
--- a/Source/cmVS14LinkFlagTable.h
+++ b/Source/cmVS140LinkFlagTable.h
@@ -1,4 +1,4 @@
-static cmVS7FlagTable cmVS14LinkFlagTable[] = {
+static cmVS7FlagTable cmVS140LinkFlagTable[] = {
 
   // Enum Properties
   { "ShowProgress", "", "Not Set", "NotSet", 0 },
diff --git a/Source/cmVS14LinkFlagTable.h b/Source/cmVS141LinkFlagTable.h
similarity index 99%
rename from Source/cmVS14LinkFlagTable.h
rename to Source/cmVS141LinkFlagTable.h
index 596f880..ec5dc2a 100644
--- a/Source/cmVS14LinkFlagTable.h
+++ b/Source/cmVS141LinkFlagTable.h
@@ -1,4 +1,4 @@
-static cmVS7FlagTable cmVS14LinkFlagTable[] = {
+static cmVS7FlagTable cmVS141LinkFlagTable[] = {
 
   // Enum Properties
   { "ShowProgress", "", "Not Set", "NotSet", 0 },
diff --git a/Source/cmVisualStudio10ToolsetOptions.cxx b/Source/cmVisualStudio10ToolsetOptions.cxx
index afca216..9a1d950 100644
--- a/Source/cmVisualStudio10ToolsetOptions.cxx
+++ b/Source/cmVisualStudio10ToolsetOptions.cxx
@@ -26,10 +26,11 @@
 #include "cmVS12RCFlagTable.h"
 #include "cmVS140CLFlagTable.h"
 #include "cmVS140CSharpFlagTable.h"
+#include "cmVS140LinkFlagTable.h"
 #include "cmVS141CLFlagTable.h"
 #include "cmVS141CSharpFlagTable.h"
+#include "cmVS141LinkFlagTable.h"
 #include "cmVS14LibFlagTable.h"
-#include "cmVS14LinkFlagTable.h"
 #include "cmVS14MASMFlagTable.h"
 #include "cmVS14RCFlagTable.h"
 
@@ -114,8 +115,10 @@ cmIDEFlagTable const* cmVisualStudio10ToolsetOptions::GetLinkFlagTable(
 {
   std::string const useToolset = this->GetToolsetName(name, toolset);
 
-  if ((useToolset == "v140") || (useToolset == "v141")) {
-    return cmVS14LinkFlagTable;
+  if (useToolset == "v141") {
+    return cmVS141LinkFlagTable;
+  } else if (useToolset == "v140") {
+    return cmVS140LinkFlagTable;
   } else if (useToolset == "v120") {
     return cmVS12LinkFlagTable;
   } else if (useToolset == "v110") {

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

Summary of changes:
 Help/release/dev/deb-on-windows.rst                |    7 +++
 Modules/CPackDeb.cmake                             |   14 +++--
 Modules/FindXCTest.cmake                           |    4 +-
 Source/CMakeLists.txt                              |    2 +-
 Source/CPack/cmCPackDebGenerator.cxx               |   28 +++++++--
 Source/CPack/cmCPackGeneratorFactory.cxx           |   10 ++--
 Source/cmFileCommand.cxx                           |   41 ++++++++-----
 Source/cmGlobalVisualStudio10Generator.cxx         |   19 ++++++
 Source/cmGlobalVisualStudio10Generator.h           |    9 +++
 Source/cmGlobalVisualStudio14Generator.cxx         |    4 +-
 Source/cmGlobalVisualStudio15Generator.cxx         |    2 +
 Source/cmGlobalXCodeGenerator.cxx                  |   30 +++++++++-
 Source/cmLocalGenerator.cxx                        |   13 +++++
 ...mVS14LinkFlagTable.h => cmVS140LinkFlagTable.h} |    9 ++-
 ...mVS14LinkFlagTable.h => cmVS141LinkFlagTable.h} |   12 +++-
 Source/cmVisualStudio10TargetGenerator.cxx         |   37 +++---------
 Source/cmVisualStudio10ToolsetOptions.cxx          |    9 ++-
 Source/cmXCodeScheme.cxx                           |   61 +++++++++++++-------
 Source/cmXCodeScheme.h                             |   17 ++++--
 Source/cm_sys_stat.h                               |    5 ++
 Tests/XCTest/CMakeLists.txt                        |    2 +-
 21 files changed, 239 insertions(+), 96 deletions(-)
 create mode 100644 Help/release/dev/deb-on-windows.rst
 copy Source/{cmVS14LinkFlagTable.h => cmVS140LinkFlagTable.h} (97%)
 rename Source/{cmVS14LinkFlagTable.h => cmVS141LinkFlagTable.h} (96%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list