[Cmake-commits] CMake branch, next, updated. v2.8.9-602-g172f33b
Brad King
brad.king at kitware.com
Tue Sep 18 17:12:17 EDT 2012
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 172f33ba989b133c63be0f6f761c2c9542944ddc (commit)
via 8da0fe4b535103484960c7f5c60461b1349854dd (commit)
from 3a40dbdc2c322b0471add8413dec92f266f603c3 (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=172f33ba989b133c63be0f6f761c2c9542944ddc
commit 172f33ba989b133c63be0f6f761c2c9542944ddc
Merge: 3a40dbd 8da0fe4
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Sep 18 17:12:16 2012 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Sep 18 17:12:16 2012 -0400
Merge topic 'ExternalProject-DOWNLOAD_NAME' into next
8da0fe4 ExternalProject: Add DOWNLOAD_NAME option
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=8da0fe4b535103484960c7f5c60461b1349854dd
commit 8da0fe4b535103484960c7f5c60461b1349854dd
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Sep 18 16:02:00 2012 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Sep 18 16:06:21 2012 -0400
ExternalProject: Add DOWNLOAD_NAME option
Some download URLs do not have the filename embedded in the url.
Add an interface to specify the local filename explicitly.
Suggested-by: James Goppert <james.goppert at gmail.com>
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index cd77ba4..56f8f9e 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -9,6 +9,7 @@
# [TMP_DIR dir] # Directory to store temporary files
# [STAMP_DIR dir] # Directory to store step timestamps
# #--Download step--------------
+# [DOWNLOAD_NAME fname] # File name to store (if not end of URL)
# [DOWNLOAD_DIR dir] # Directory to store downloaded files
# [DOWNLOAD_COMMAND cmd...] # Command to download source tree
# [CVS_REPOSITORY cvsroot] # CVSROOT of CVS repository
@@ -1092,6 +1093,7 @@ function(_ep_add_download_command name)
get_property(git_repository TARGET ${name} PROPERTY _EP_GIT_REPOSITORY)
get_property(hg_repository TARGET ${name} PROPERTY _EP_HG_REPOSITORY )
get_property(url TARGET ${name} PROPERTY _EP_URL)
+ get_property(fname TARGET ${name} PROPERTY _EP_DOWNLOAD_NAME)
# TODO: Perhaps file:// should be copied to download dir before extraction.
string(REGEX REPLACE "^file://" "" url "${url}")
@@ -1272,7 +1274,9 @@ function(_ep_add_download_command name)
else()
if("${url}" MATCHES "^[a-z]+://")
# TODO: Should download and extraction be different steps?
- string(REGEX MATCH "[^/\\?]*$" fname "${url}")
+ if("x${fname}" STREQUAL "x")
+ string(REGEX MATCH "[^/\\?]*$" fname "${url}")
+ endif()
if(NOT "${fname}" MATCHES "(\\.|=)(bz2|tar|tgz|tar\\.gz|zip)$")
string(REGEX MATCH "([^/\\?]+(\\.|=)(bz2|tar|tgz|tar\\.gz|zip))/.*$" match_result "${url}")
set(fname "${CMAKE_MATCH_1}")
-----------------------------------------------------------------------
Summary of changes:
Modules/ExternalProject.cmake | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list