[Cmake-commits] CMake branch, next, updated. v2.8.1-1238-g4c5c8a2

cmake-commits at cmake.org cmake-commits at cmake.org
Wed May 26 17:44:47 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  4c5c8a2d958471a395eec2aa791181d94ee618cd (commit)
       via  f5e8ce522e5b37f29d5ef89aa79e1b82e192466f (commit)
      from  1423fe6edc3f5b86bf0a6563244f0c8d0960674b (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=4c5c8a2d958471a395eec2aa791181d94ee618cd
commit 4c5c8a2d958471a395eec2aa791181d94ee618cd
Merge: 1423fe6 f5e8ce5
Author: David Cole <david.cole at kitware.com>
Date:   Wed May 26 17:44:04 2010 -0400

    Merge branch 'use-rename-not-copy-ExternalProject' into next


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f5e8ce522e5b37f29d5ef89aa79e1b82e192466f
commit f5e8ce522e5b37f29d5ef89aa79e1b82e192466f
Author: David Cole <david.cole at kitware.com>
Date:   Wed May 26 17:42:56 2010 -0400

    Use RENAME, not COPY, to extract .tar.gz files.
    
      Use ABSOLUTE file name for the RENAME operation.
      (Thanks to Marcus for figuring out that it doesn't
       work on Linux without the ABSOLUTE bit.)

diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 0302d5c..7f29147 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -243,7 +243,7 @@ message(STATUS \"downloading... done\")
 endfunction(_ep_write_downloadfile_script)
 
 
-function(_ep_write_extractfile_script script_filename filename tmp directory)
+function(_ep_write_extractfile_script script_filename filename directory)
   set(args "")
 
   if(filename MATCHES ".tar$")
@@ -267,7 +267,6 @@ function(_ep_write_extractfile_script script_filename filename tmp directory)
 "# Make file names absolute:
 #
 get_filename_component(filename \"${filename}\" ABSOLUTE)
-get_filename_component(tmp \"${tmp}\" ABSOLUTE)
 get_filename_component(directory \"${directory}\" ABSOLUTE)
 
 message(STATUS \"extracting...
@@ -276,11 +275,11 @@ message(STATUS \"extracting...
 
 # Prepare a space for extracting:
 #
-set(i 1)
-while(EXISTS \"\${tmp}/extract\${i}\")
+set(i 1234)
+while(EXISTS \"\${directory}/../ex\${i}\")
   math(EXPR i \"\${i} + 1\")
 endwhile()
-set(ut_dir \"\${tmp}/extract\${i}\")
+set(ut_dir \"\${directory}/../ex\${i}\")
 file(MAKE_DIRECTORY \"\${ut_dir}\")
 
 # Extract it:
@@ -305,10 +304,12 @@ if(NOT n EQUAL 1 OR NOT IS_DIRECTORY \"\${contents}\")
   set(contents \"\${ut_dir}\")
 endif()
 
-# Copy \"the one\" directory to the final directory:
+# Move \"the one\" directory to the final directory:
 #
-message(STATUS \"extracting... [copy]\")
-file(COPY \"\${contents}/\" DESTINATION \${directory})
+message(STATUS \"extracting... [rename]\")
+file(REMOVE_RECURSE \${directory})
+get_filename_component(contents \${contents} ABSOLUTE)
+file(RENAME \${contents} \${directory})
 
 # Clean up:
 #
@@ -710,7 +711,7 @@ function(_ep_add_download_command name)
         set(comment "Performing download step (extract) for '${name}'")
       endif()
       # TODO: Support other archive formats.
-      _ep_write_extractfile_script("${stamp_dir}/extract-${name}.cmake" "${file}" "${tmp_dir}" "${source_dir}")
+      _ep_write_extractfile_script("${stamp_dir}/extract-${name}.cmake" "${file}" "${source_dir}")
       list(APPEND cmd ${CMAKE_COMMAND} -P ${stamp_dir}/extract-${name}.cmake)
     endif()
   else()

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

Summary of changes:
 Modules/ExternalProject.cmake |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list