[Cmake-commits] CMake branch, master, updated. v3.11.0-rc2-200-g6422a02

Kitware Robot kwrobot at kitware.com
Fri Mar 9 07:55:03 EST 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  6422a0209c349e8e39cb5a2dd5114422bd1dd829 (commit)
       via  760c6c08a5f5ba6390f40a7dddb499bd7f16c702 (commit)
       via  6f2f9ce331179091c6d5c75d78cdf3f67255ded1 (commit)
      from  6e56f288083e7cd21d67756b1034604d9184b9b4 (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=6422a0209c349e8e39cb5a2dd5114422bd1dd829
commit 6422a0209c349e8e39cb5a2dd5114422bd1dd829
Merge: 6e56f28 760c6c0
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Mar 9 07:45:30 2018 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Mar 9 07:45:30 2018 -0500

    Merge branch 'release-3.10'


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=760c6c08a5f5ba6390f40a7dddb499bd7f16c702
commit 760c6c08a5f5ba6390f40a7dddb499bd7f16c702
Merge: c1e087a 6f2f9ce
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Mar 9 06:51:38 2018 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Mar 9 06:59:19 2018 -0500

    Merge branch 'autogen-empty-source-file-fix' into release-3.10
    
    There is no corresponding merge request because this fix was
    cherry-picked specifically for CMake 3.10.


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6f2f9ce331179091c6d5c75d78cdf3f67255ded1
commit 6f2f9ce331179091c6d5c75d78cdf3f67255ded1
Author:     Sebastian Holtermann <sebholt at xwmw.org>
AuthorDate: Fri Mar 9 09:40:59 2018 +0100
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Mar 9 06:51:14 2018 -0500

    Autogen: Fix for the empty source file crash in 3.10.2
    
    Issue: #17793

diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index a9c9b9d..f91ebb2 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -80,15 +80,21 @@ static bool ReadFile(std::string& content, std::string const& filename,
     std::size_t const length = cmSystemTools::FileLength(filename);
     cmsys::ifstream ifs(filename.c_str(), (std::ios::in | std::ios::binary));
     if (ifs) {
-      content.resize(length);
-      ifs.read(&content.front(), content.size());
-      if (ifs) {
-        success = true;
+      if (length > 0) {
+        content.resize(length);
+        ifs.read(&content.front(), content.size());
+        if (ifs) {
+          success = true;
+        } else {
+          content.clear();
+          if (error != nullptr) {
+            error->append("Reading from the file failed.");
+          }
+        }
       } else {
+        // Readable but empty file
         content.clear();
-        if (error != nullptr) {
-          error->append("Reading from the file failed.");
-        }
+        success = true;
       }
     } else if (error != nullptr) {
       error->append("Opening the file for reading failed.");

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list