[Cmake-commits] CMake branch, master, updated. v3.11.1-829-gb6ce5ae

Kitware Robot kwrobot at kitware.com
Thu May 17 09:15:08 EDT 2018


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  b6ce5aef0fd3b9d0c60643073db1880b857189b8 (commit)
       via  4ba7db4ff36a20512b0bd9e725b7dea5246e7554 (commit)
       via  6411180969ee1a384d9f37f76fa71a3690113f1d (commit)
       via  10a6c5a8422f95d5558763127601e72a4060d61e (commit)
       via  b6c49713b35cf1ab9c0bff30cb7a6e20a8f3b481 (commit)
       via  2db4945150a1a94aeaab6add1b5b371ba6fbdc59 (commit)
       via  3333e2791b2f1684daf4c05a46e7506f52d38aff (commit)
       via  24367563d7db154c6a3690c9e95f2c78ac0438e8 (commit)
       via  1e0a2e93775c8d3b6b81b82d285986ad2f9d1cf1 (commit)
       via  3715d0fbcfd4ca06de961421f5bc1283d5c58444 (commit)
      from  e81e024330c57b154a30f8c8af1a15a49d1614e5 (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=b6ce5aef0fd3b9d0c60643073db1880b857189b8
commit b6ce5aef0fd3b9d0c60643073db1880b857189b8
Merge: 4ba7db4 b6c4971
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 17 13:06:51 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu May 17 09:06:56 2018 -0400

    Merge topic 'makefile-ar-limits'
    
    b6c49713b3 Makefile: Fix command line limits for static libs
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2078


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4ba7db4ff36a20512b0bd9e725b7dea5246e7554
commit 4ba7db4ff36a20512b0bd9e725b7dea5246e7554
Merge: 6411180 2db4945
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 17 13:05:57 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu May 17 09:06:22 2018 -0400

    Merge topic 'pr.file_write_check'
    
    2db4945150 file(WRITE): Report errors during write operation
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2076


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6411180969ee1a384d9f37f76fa71a3690113f1d
commit 6411180969ee1a384d9f37f76fa71a3690113f1d
Merge: 10a6c5a 3715d0f
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 17 13:05:28 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu May 17 09:05:48 2018 -0400

    Merge topic 'autogen_register_info_files'
    
    3715d0fbcf Tests: Add QtAutogen test for a low cmake_minimum_required version
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2077


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=10a6c5a8422f95d5558763127601e72a4060d61e
commit 10a6c5a8422f95d5558763127601e72a4060d61e
Merge: e81e024 3333e27
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu May 17 13:04:37 2018 +0000
Commit:     Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu May 17 09:05:09 2018 -0400

    Merge topic 'update-kwsys'
    
    3333e2791b Help: Add release note about 'copy_directory' behavior change
    24367563d7 Merge branch 'upstream-KWSys' into update-kwsys
    1e0a2e9377 KWSys 2018-05-15 (5f757898)
    
    Acked-by: Kitware Robot <kwrobot at kitware.com>
    Merge-request: !2080


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b6c49713b35cf1ab9c0bff30cb7a6e20a8f3b481
commit b6c49713b35cf1ab9c0bff30cb7a6e20a8f3b481
Author:     Viktor Mukha <viktor.m at l4b-software.com>
AuthorDate: Wed May 16 10:04:04 2018 +0200
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 16 12:48:20 2018 -0400

    Makefile: Fix command line limits for static libs
    
    I have been hitting the Windows command-line limit when cross-compiling
    static library (POCO) and having more than 8000 characters in the call
    to "ar". Calculating exact limits here are tricky, since this particular
    limit will only take into account object file strings, which is correct
    for response files, but not for the archive rules (link.txt files),
    since they also contain the call to "ar" and its arguments.
    Also, there can be other additional arguments if "ar" tool is wrapped
    into something else, so it is a good idea to leave more space than
    trying to exactly fit the limit.
    Since response files use half of the limit as a heuristic, we reproduce
    it here for consistency.

diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 27fae04..c538992 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -5,6 +5,7 @@
 #include <algorithm>
 #include <memory> // IWYU pragma: keep
 #include <sstream>
+#include <stddef.h>
 #include <vector>
 
 #include "cmGeneratedFileStream.h"
@@ -732,10 +733,14 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules(
     // Archiving rules never use a response file.
     useResponseFileForObjects = false;
 
-    // Limit the length of individual object lists to less than the
-    // 32K command line length limit on Windows.  We could make this a
-    // platform file variable but this should work everywhere.
-    archiveCommandLimit = 30000;
+    // Limit the length of individual object lists to less than half of
+    // the command line length limit (leaving half for other flags).
+    // This may result in several calls to the archiver.
+    if (size_t limit = cmSystemTools::CalculateCommandLineLengthLimit()) {
+      archiveCommandLimit = limit / 2;
+    } else {
+      archiveCommandLimit = 8000;
+    }
   }
 
   // Expand the rule variables.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2db4945150a1a94aeaab6add1b5b371ba6fbdc59
commit 2db4945150a1a94aeaab6add1b5b371ba6fbdc59
Author:     Ruslan Baratov <ruslan_baratov at yahoo.com>
AuthorDate: Tue May 15 21:36:36 2018 +0300
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 16 10:34:28 2018 -0400

    file(WRITE): Report errors during write operation
    
    We already report an error if the file cannot be opened for writing.
    Add another check to report an error if a write operation itself fails.

diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 6c1a869..1e47687 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -232,6 +232,14 @@ bool cmFileCommand::HandleWriteCommand(std::vector<std::string> const& args,
   }
   std::string message = cmJoin(cmMakeRange(i, args.end()), std::string());
   file << message;
+  if (!file) {
+    std::string error = "write failed (";
+    error += cmSystemTools::GetLastSystemError();
+    error += "):\n  ";
+    error += fileName;
+    this->SetError(error);
+    return false;
+  }
   file.close();
   if (mode) {
     cmSystemTools::SetPermissions(fileName.c_str(), mode);

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3333e2791b2f1684daf4c05a46e7506f52d38aff
commit 3333e2791b2f1684daf4c05a46e7506f52d38aff
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 16 09:54:27 2018 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 16 09:54:27 2018 -0400

    Help: Add release note about 'copy_directory' behavior change
    
    Issue: #16001

diff --git a/Help/release/dev/copy_directory.rst b/Help/release/dev/copy_directory.rst
new file mode 100644
index 0000000..71b9fdf
--- /dev/null
+++ b/Help/release/dev/copy_directory.rst
@@ -0,0 +1,6 @@
+copy_directory
+--------------
+
+* The :manual:`cmake(1)` ``-E copy_directory`` tool now fails when the
+  source directory does not exist.  Previously it succeeded by creating
+  an empty destination directory.

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=24367563d7db154c6a3690c9e95f2c78ac0438e8
commit 24367563d7db154c6a3690c9e95f2c78ac0438e8
Merge: c698dbd 1e0a2e9
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 16 09:51:20 2018 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 16 09:54:08 2018 -0400

    Merge branch 'upstream-KWSys' into update-kwsys
    
    * upstream-KWSys:
      KWSys 2018-05-15 (5f757898)
    
    Fixes: #16001


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1e0a2e93775c8d3b6b81b82d285986ad2f9d1cf1
commit 1e0a2e93775c8d3b6b81b82d285986ad2f9d1cf1
Author:     KWSys Upstream <kwrobot at kitware.com>
AuthorDate: Tue May 15 08:52:52 2018 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 16 09:51:17 2018 -0400

    KWSys 2018-05-15 (5f757898)
    
    Code extracted from:
    
        https://gitlab.kitware.com/utils/kwsys.git
    
    at commit 5f757898119974aa30f700d5c38928ee48407320 (master).
    
    Upstream Shortlog
    -----------------
    
    Marian Klymov (1):
          d06fcab7 SystemTools: Check source directory in CopyADirectory

diff --git a/SystemTools.cxx b/SystemTools.cxx
index 52f509a..7167527 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -2282,7 +2282,9 @@ bool SystemTools::CopyADirectory(const std::string& source,
                                  const std::string& destination, bool always)
 {
   Directory dir;
-  dir.Load(source);
+  if (dir.Load(source) == 0) {
+    return false;
+  }
   size_t fileNum;
   if (!SystemTools::MakeDirectory(destination)) {
     return false;
diff --git a/testDirectory.cxx b/testDirectory.cxx
index 983f2c6..62a0986 100644
--- a/testDirectory.cxx
+++ b/testDirectory.cxx
@@ -73,7 +73,38 @@ int _doLongPathTest()
   return res;
 }
 
+int _copyDirectoryTest()
+{
+  using namespace kwsys;
+  const std::string source(TEST_SYSTEMTOOLS_BINARY_DIR
+                           "/directory_testing/copyDirectoryTestSrc");
+  if (SystemTools::PathExists(source)) {
+    std::cerr << source << " shouldn't exist before test" << std::endl;
+    return 1;
+  }
+  const std::string destination(TEST_SYSTEMTOOLS_BINARY_DIR
+                                "/directory_testing/copyDirectoryTestDst");
+  if (SystemTools::PathExists(destination)) {
+    std::cerr << destination << " shouldn't exist before test" << std::endl;
+    return 2;
+  }
+  const bool copysuccess = SystemTools::CopyADirectory(source, destination);
+  const bool destinationexists = SystemTools::PathExists(destination);
+  if (copysuccess) {
+    std::cerr << "CopyADirectory should have returned false" << std::endl;
+    SystemTools::RemoveADirectory(destination);
+    return 3;
+  }
+  if (destinationexists) {
+    std::cerr << "CopyADirectory returned false, but destination directory"
+              << " has been created" << std::endl;
+    SystemTools::RemoveADirectory(destination);
+    return 4;
+  }
+  return 0;
+}
+
 int testDirectory(int, char* [])
 {
-  return _doLongPathTest();
+  return _doLongPathTest() + _copyDirectoryTest();
 }

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3715d0fbcfd4ca06de961421f5bc1283d5c58444
commit 3715d0fbcfd4ca06de961421f5bc1283d5c58444
Author:     Sebastian Holtermann <sebholt at xwmw.org>
AuthorDate: Sat May 12 11:24:33 2018 +0200
Commit:     Sebastian Holtermann <sebholt at xwmw.org>
CommitDate: Wed May 16 09:11:45 2018 +0200

    Tests: Add QtAutogen test for a low cmake_minimum_required version

diff --git a/Tests/QtAutogen/CommonTests.cmake b/Tests/QtAutogen/CommonTests.cmake
index 094a755..982a296 100644
--- a/Tests/QtAutogen/CommonTests.cmake
+++ b/Tests/QtAutogen/CommonTests.cmake
@@ -1,4 +1,6 @@
 # Autogen tests common for Qt4 and Qt5
+ADD_AUTOGEN_TEST(Complex QtAutogen)
+ADD_AUTOGEN_TEST(LowMinimumVersion lowMinimumVersion)
 ADD_AUTOGEN_TEST(MocOnly mocOnly)
 ADD_AUTOGEN_TEST(MocOptions mocOptions)
 ADD_AUTOGEN_TEST(UicOnly uicOnly)
@@ -35,7 +37,6 @@ ADD_AUTOGEN_TEST(Parallel4 parallel4)
 ADD_AUTOGEN_TEST(ParallelAUTO parallelAUTO)
 ADD_AUTOGEN_TEST(SameName sameName)
 ADD_AUTOGEN_TEST(StaticLibraryCycle slc)
-ADD_AUTOGEN_TEST(Complex QtAutogen)
 # Rerun tests
 ADD_AUTOGEN_TEST(RerunMocBasic)
 if(NOT QT_TEST_VERSION STREQUAL 4)
diff --git a/Tests/QtAutogen/LowMinimumVersion/CMakeLists.txt b/Tests/QtAutogen/LowMinimumVersion/CMakeLists.txt
new file mode 100644
index 0000000..a6ac338
--- /dev/null
+++ b/Tests/QtAutogen/LowMinimumVersion/CMakeLists.txt
@@ -0,0 +1,16 @@
+# Use a low minimum version
+cmake_minimum_required(VERSION 3.0)
+project(LowMinimumVersion)
+include("../AutogenTest.cmake")
+
+set(CMAKE_AUTOMOC ON)
+set(CMAKE_AUTOUIC ON)
+set(CMAKE_AUTORCC ON)
+add_executable(lowMinimumVersion
+  main.cpp
+  item.hpp
+  item.cpp
+  view.ui
+  someText.txt
+  example.qrc)
+target_link_libraries(lowMinimumVersion ${QT_QTCORE_TARGET})
diff --git a/Tests/QtAutogen/LowMinimumVersion/example.qrc b/Tests/QtAutogen/LowMinimumVersion/example.qrc
new file mode 100644
index 0000000..551ecc8
--- /dev/null
+++ b/Tests/QtAutogen/LowMinimumVersion/example.qrc
@@ -0,0 +1,5 @@
+<RCC>
+  <qresource prefix="Example">
+    <file>someText.txt</file>
+  </qresource>
+</RCC>
diff --git a/Tests/QtAutogen/LowMinimumVersion/item.cpp b/Tests/QtAutogen/LowMinimumVersion/item.cpp
new file mode 100644
index 0000000..e2f19b2
--- /dev/null
+++ b/Tests/QtAutogen/LowMinimumVersion/item.cpp
@@ -0,0 +1,19 @@
+#include "item.hpp"
+#include <ui_view.h>
+
+class MocLocal : public QObject
+{
+  Q_OBJECT;
+
+public:
+  MocLocal() = default;
+  ~MocLocal() = default;
+};
+
+void Item::go()
+{
+  Ui_View ui;
+  MocLocal obj;
+}
+
+#include "item.moc"
diff --git a/Tests/QtAutogen/LowMinimumVersion/item.hpp b/Tests/QtAutogen/LowMinimumVersion/item.hpp
new file mode 100644
index 0000000..01255d4
--- /dev/null
+++ b/Tests/QtAutogen/LowMinimumVersion/item.hpp
@@ -0,0 +1,15 @@
+#ifndef ITEM_HPP
+#define ITEM_HPP
+
+#include <QObject>
+
+class Item : public QObject
+{
+  Q_OBJECT
+
+public:
+  Q_SLOT
+  void go();
+};
+
+#endif
diff --git a/Tests/QtAutogen/LowMinimumVersion/main.cpp b/Tests/QtAutogen/LowMinimumVersion/main.cpp
new file mode 100644
index 0000000..9f225a4
--- /dev/null
+++ b/Tests/QtAutogen/LowMinimumVersion/main.cpp
@@ -0,0 +1,10 @@
+#include "item.hpp"
+
+int main(int argc, char* argv[])
+{
+  Q_INIT_RESOURCE(example);
+  Item item;
+  item.go();
+
+  return 0;
+}
diff --git a/Tests/QtAutogen/LowMinimumVersion/someText.txt b/Tests/QtAutogen/LowMinimumVersion/someText.txt
new file mode 100644
index 0000000..750dae3
--- /dev/null
+++ b/Tests/QtAutogen/LowMinimumVersion/someText.txt
@@ -0,0 +1 @@
+Hello world, you're an interesting place.
diff --git a/Tests/QtAutogen/LowMinimumVersion/view.ui b/Tests/QtAutogen/LowMinimumVersion/view.ui
new file mode 100644
index 0000000..2ffe734
--- /dev/null
+++ b/Tests/QtAutogen/LowMinimumVersion/view.ui
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>View</class>
+ <widget class="QWidget" name="Base">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>400</width>
+    <height>300</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Form</string>
+  </property>
+  <layout class="QHBoxLayout" name="horizontalLayout">
+   <item>
+    <widget class="QTreeView" name="treeView"/>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

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

Summary of changes:
 Help/release/dev/copy_directory.rst                |    6 ++++
 Source/cmFileCommand.cxx                           |    8 +++++
 Source/cmMakefileLibraryTargetGenerator.cxx        |   13 +++++---
 Source/kwsys/SystemTools.cxx                       |    4 ++-
 Source/kwsys/testDirectory.cxx                     |   33 +++++++++++++++++++-
 Tests/QtAutogen/CommonTests.cmake                  |    3 +-
 Tests/QtAutogen/LowMinimumVersion/CMakeLists.txt   |   16 ++++++++++
 Tests/QtAutogen/LowMinimumVersion/example.qrc      |    5 +++
 .../{SameName => LowMinimumVersion}/item.cpp       |    1 -
 .../{SameName => LowMinimumVersion}/item.hpp       |    4 +--
 Tests/QtAutogen/LowMinimumVersion/main.cpp         |   10 ++++++
 Tests/QtAutogen/LowMinimumVersion/someText.txt     |    1 +
 .../{Parallel => LowMinimumVersion}/view.ui        |    0
 13 files changed, 94 insertions(+), 10 deletions(-)
 create mode 100644 Help/release/dev/copy_directory.rst
 create mode 100644 Tests/QtAutogen/LowMinimumVersion/CMakeLists.txt
 create mode 100644 Tests/QtAutogen/LowMinimumVersion/example.qrc
 copy Tests/QtAutogen/{SameName => LowMinimumVersion}/item.cpp (84%)
 copy Tests/QtAutogen/{SameName => LowMinimumVersion}/item.hpp (67%)
 create mode 100644 Tests/QtAutogen/LowMinimumVersion/main.cpp
 create mode 100644 Tests/QtAutogen/LowMinimumVersion/someText.txt
 copy Tests/QtAutogen/{Parallel => LowMinimumVersion}/view.ui (100%)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list