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  31550ebf31a59be391319c2885db46ea8b3a0875 (commit)
       via  210a80f48dd1268c424df137ad08a916147cdd97 (commit)
       via  917852396866933f35cd723318f42290753873ff (commit)
       via  c85ef9c339a9aea5160217e33f917b5d130c9fab (commit)
      from  ab8416776de32e6b6225743721315b8dcbd2d01e (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=31550ebf31a59be391319c2885db46ea8b3a0875
commit 31550ebf31a59be391319c2885db46ea8b3a0875
Merge: 210a80f c85ef9c
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Tue Feb 13 16:12:02 2018 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Tue Feb 13 11:12:14 2018 -0500

    Merge topic 'autogen-write-on-change-only'
    
    c85ef9c3 Autogen: Overwrite info files when changed only
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1753


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=210a80f48dd1268c424df137ad08a916147cdd97
commit 210a80f48dd1268c424df137ad08a916147cdd97
Merge: ab84167 9178523
Author:     Brad King <brad.k...@kitware.com>
AuthorDate: Tue Feb 13 16:08:32 2018 +0000
Commit:     Kitware Robot <kwro...@kitware.com>
CommitDate: Tue Feb 13 11:08:38 2018 -0500

    Merge topic 'FindImageMagick-FixFor7.0.x'
    
    91785239 FindImageMagick: Add 7.0 library names
    
    Acked-by: Kitware Robot <kwro...@kitware.com>
    Merge-request: !1754


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=917852396866933f35cd723318f42290753873ff
commit 917852396866933f35cd723318f42290753873ff
Author:     Roman Wüger <off...@wueger.at>
AuthorDate: Tue Feb 6 20:43:25 2018 +0100
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Tue Feb 6 14:54:33 2018 -0500

    FindImageMagick: Add 7.0 library names
    
    For ImageMagick 7.0.x we need to consider `CORE_RL_MagickWand_` and
    `CORE_RL_MagickCore_`.

diff --git a/Modules/FindImageMagick.cmake b/Modules/FindImageMagick.cmake
index c16bbf2..881bff1 100644
--- a/Modules/FindImageMagick.cmake
+++ b/Modules/FindImageMagick.cmake
@@ -206,7 +206,7 @@ foreach(component ${ImageMagick_FIND_COMPONENTS}
     list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_Magick++_LIBRARY)
   elseif(component STREQUAL "MagickWand")
     FIND_IMAGEMAGICK_API(MagickWand "wand/MagickWand.h;MagickWand/MagickWand.h"
-      Wand MagickWand CORE_RL_wand_
+      Wand MagickWand CORE_RL_wand_ CORE_RL_MagickWand_
       MagickWand-6 MagickWand-7
       MagickWand-Q16 MagickWand-Q8 MagickWand-Q16HDRI MagickWand-Q8HDRI
       MagickWand-6.Q64 MagickWand-6.Q32 MagickWand-6.Q64HDRI 
MagickWand-6.Q32HDRI
@@ -217,7 +217,7 @@ foreach(component ${ImageMagick_FIND_COMPONENTS}
     list(APPEND ImageMagick_REQUIRED_VARS ImageMagick_MagickWand_LIBRARY)
   elseif(component STREQUAL "MagickCore")
     FIND_IMAGEMAGICK_API(MagickCore 
"magick/MagickCore.h;MagickCore/MagickCore.h"
-      Magick MagickCore CORE_RL_magick_
+      Magick MagickCore CORE_RL_magick_ CORE_RL_MagickCore_
       MagickCore-6 MagickCore-7
       MagickCore-Q16 MagickCore-Q8 MagickCore-Q16HDRI MagickCore-Q8HDRI
       MagickCore-6.Q64 MagickCore-6.Q32 MagickCore-6.Q64HDRI 
MagickCore-6.Q32HDRI

https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c85ef9c339a9aea5160217e33f917b5d130c9fab
commit c85ef9c339a9aea5160217e33f917b5d130c9fab
Author:     Sebastian Holtermann <sebh...@xwmw.org>
AuthorDate: Tue Feb 6 14:51:44 2018 +0100
Commit:     Brad King <brad.k...@kitware.com>
CommitDate: Tue Feb 6 11:20:08 2018 -0500

    Autogen: Overwrite info files when changed only
    
    Check if the content of the AUTOMOC/UIC/RCC info file
    will change before overwriting it. This avoids unnecessary
    AUTORCC rebuilds when AUTORCC unrelated CMake settings change.

diff --git a/Source/cmQtAutoGenInitializer.cxx 
b/Source/cmQtAutoGenInitializer.cxx
index 41142e5..93c78b5 100644
--- a/Source/cmQtAutoGenInitializer.cxx
+++ b/Source/cmQtAutoGenInitializer.cxx
@@ -8,6 +8,7 @@
 #include "cmCustomCommandLines.h"
 #include "cmDuration.h"
 #include "cmFilePathChecksum.h"
+#include "cmGeneratedFileStream.h"
 #include "cmGeneratorTarget.h"
 #include "cmGlobalGenerator.h"
 #include "cmLinkItem.h"
@@ -22,7 +23,6 @@
 #include "cmStateTypes.h"
 #include "cmSystemTools.h"
 #include "cmTarget.h"
-#include "cm_sys_stat.h"
 #include "cmake.h"
 #include "cmsys/FStream.hxx"
 #include "cmsys/SystemInformation.hxx"
@@ -867,34 +867,6 @@ void cmQtAutoGenInitializer::SetupCustomTargets()
     dir += cfg;
   }
 
-  auto OpenInfoFile = [](cmsys::ofstream& ofs,
-                         std::string const& fileName) -> bool {
-    // Ensure we have write permission
-    if (cmSystemTools::FileExists(fileName)) {
-      mode_t perm = 0;
-#if defined(_WIN32) && !defined(__CYGWIN__)
-      mode_t mode_write = S_IWRITE;
-#else
-      mode_t mode_write = S_IWUSR;
-#endif
-      cmSystemTools::GetPermissions(fileName, perm);
-      if (!(perm & mode_write)) {
-        cmSystemTools::SetPermissions(fileName, perm | mode_write);
-      }
-    }
-
-    ofs.open(fileName.c_str(),
-             (std::ios::out | std::ios::binary | std::ios::trunc));
-    if (!ofs) {
-      // File open error
-      std::string error = "Internal CMake error when trying to open file: ";
-      error += Quoted(fileName);
-      error += " for writing.";
-      cmSystemTools::Error(error.c_str());
-    }
-    return static_cast<bool>(ofs);
-  };
-
   // Generate autogen target info file
   if (this->MocEnabled || this->UicEnabled) {
     if (this->MocEnabled) {
@@ -911,8 +883,10 @@ void cmQtAutoGenInitializer::SetupCustomTargets()
       this->Parallel = std::to_string(GetParallelCPUCount());
     }
 
-    cmsys::ofstream ofs;
-    if (OpenInfoFile(ofs, this->AutogenInfoFile)) {
+    cmGeneratedFileStream ofs;
+    ofs.SetCopyIfDifferent(true);
+    ofs.Open(this->AutogenInfoFile.c_str(), false, true);
+    if (ofs) {
       // Utility lambdas
       auto CWrite = [&ofs](const char* key, std::string const& value) {
         ofs << "set(" << key << " " << cmOutputConverter::EscapeForCMake(value)
@@ -1012,14 +986,18 @@ void cmQtAutoGenInitializer::SetupCustomTargets()
         CWriteNestedLists("AM_UIC_OPTIONS_OPTIONS", this->UicFileOptions);
         CWriteList("AM_UIC_SEARCH_PATHS", this->UicSearchPaths);
       }
+    } else {
+      return;
     }
   }
 
   // Generate auto RCC info files
   if (this->RccEnabled) {
     for (Qrc const& qrc : this->Qrcs) {
-      cmsys::ofstream ofs;
-      if (OpenInfoFile(ofs, qrc.InfoFile)) {
+      cmGeneratedFileStream ofs;
+      ofs.SetCopyIfDifferent(true);
+      ofs.Open(qrc.InfoFile.c_str(), false, true);
+      if (ofs) {
         // Utility lambdas
         auto CWrite = [&ofs](const char* key, std::string const& value) {
           ofs << "set(" << key << " "
@@ -1069,7 +1047,7 @@ void cmQtAutoGenInitializer::SetupCustomTargets()
         CWrite("ARCC_OPTIONS", cmJoin(qrc.Options, ";"));
         CWrite("ARCC_INPUTS", cmJoin(qrc.Resources, ";"));
       } else {
-        break;
+        return;
       }
     }
   }

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

Summary of changes:
 Modules/FindImageMagick.cmake     |    4 ++--
 Source/cmQtAutoGenInitializer.cxx |   46 ++++++++++---------------------------
 2 files changed, 14 insertions(+), 36 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
https://cmake.org/mailman/listinfo/cmake-commits

Reply via email to