[Cmake-commits] CMake branch, next, updated. v2.8.1-1289-ga6d7c87

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Jun 3 12:28:09 EDT 2010


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, next has been updated
       via  a6d7c878bd045dfbcac11aae048fb602446a1be7 (commit)
       via  b8a1319c354b7f257e6c0b82e428cfe94dcbf4ff (commit)
      from  3a84da8f75f83cf9e18ee6e65fac01ef477223e2 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a6d7c878bd045dfbcac11aae048fb602446a1be7
commit a6d7c878bd045dfbcac11aae048fb602446a1be7
Merge: 3a84da8 b8a1319
Author: Brad King <brad.king at kitware.com>
Date:   Thu Jun 3 12:26:31 2010 -0400

    Merge branch 'file-time-permissions' into next


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b8a1319c354b7f257e6c0b82e428cfe94dcbf4ff
commit b8a1319c354b7f257e6c0b82e428cfe94dcbf4ff
Author: Brad King <brad.king at kitware.com>
Date:   Thu Jun 3 11:57:02 2010 -0400

    Avoid use of CopyAFile "copyPermissions" parameter
    
    Commit 0fafdb7e (Do not copy permissions of files when making the copy
    in an install rule, 2008-12-18) added special behavior to KWSys file
    copy methods for this special case.  Use a local solution to avoid use
    of the special behavior so it can be removed later.

diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index 5611527..60a81f3 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -1507,7 +1507,7 @@ bool cmFileCopier::InstallFile(const char* fromFile, const char* toFile,
   this->ReportCopy(toFile, TypeFile, copy);
 
   // Copy the file.
-  if(copy && !cmSystemTools::CopyAFile(fromFile, toFile, true, false))
+  if(copy && !cmSystemTools::CopyAFile(fromFile, toFile, true))
     {
     cmOStringStream e;
     e << this->Name << " cannot copy file \"" << fromFile
@@ -1519,6 +1519,13 @@ bool cmFileCopier::InstallFile(const char* fromFile, const char* toFile,
   // Set the file modification time of the destination file.
   if(copy && !this->Always)
     {
+    // Add write permission so we can set the file time.
+    // Permissions are set unconditionally below anyway.
+    mode_t perm = 0;
+    if(cmSystemTools::GetPermissions(toFile, perm))
+      {
+      cmSystemTools::SetPermissions(toFile, perm | mode_owner_write);
+      }
     if (!cmSystemTools::CopyFileTime(fromFile, toFile))
       {
       cmOStringStream e;

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

Summary of changes:
 Source/cmFileCommand.cxx |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list