[Cmake-commits] CMake branch, next, updated. v3.6.0-rc4-693-g603d1e5
Brad King
brad.king at kitware.com
Tue Jul 5 15:01:50 EDT 2016
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 603d1e542663bc45ff0169dd513d2db40e02901c (commit)
via 57c337e2ef358c5eae2b2e364065e93bf58f0f64 (commit)
from d2bca3540bcd9d1982a07e9cbf2b4cdef3b10e97 (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=603d1e542663bc45ff0169dd513d2db40e02901c
commit 603d1e542663bc45ff0169dd513d2db40e02901c
Merge: d2bca35 57c337e
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Jul 5 15:01:49 2016 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jul 5 15:01:49 2016 -0400
Merge topic 'ExternalProject-more-url-filenames' into next
57c337e2 ExternalProject: Match filenames in URLs with query strings and anchors
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=57c337e2ef358c5eae2b2e364065e93bf58f0f64
commit 57c337e2ef358c5eae2b2e364065e93bf58f0f64
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Jul 5 14:52:00 2016 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Jul 5 14:57:13 2016 -0400
ExternalProject: Match filenames in URLs with query strings and anchors
While at it, refactor logic to consolidate the filename extraction
and verification into a single match.
Inspired-by: Ruslan Baratov <ruslan_baratov at yahoo.com>
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 2ff18fc..ee517f6 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1871,15 +1871,13 @@ function(_ep_add_download_command name)
if("${url}" MATCHES "^[a-z]+://")
# TODO: Should download and extraction be different steps?
if("x${fname}" STREQUAL "x")
- string(REGEX MATCH "[^/\\?]*$" fname "${url}")
+ set(fname "${url}")
endif()
- if(NOT "${fname}" MATCHES "(\\.|=)(7z|tar|tar\\.bz2|tar\\.gz|tar\\.xz|tbz2|tgz|txz|zip)$")
- string(REGEX MATCH "([^/\\?]+(\\.|=)(7z|tar|tar\\.bz2|tar\\.gz|tar\\.xz|tbz2|tgz|txz|zip))/.*$" match_result "${url}")
+ if("${fname}" MATCHES [[([^/\?#]+(\.|=)(7z|tar|tar\.bz2|tar\.gz|tar\.xz|tbz2|tgz|txz|zip))([/?#].*)?$]])
set(fname "${CMAKE_MATCH_1}")
- endif()
- if (no_extract)
- get_filename_component(fname "${url}" NAME)
- elseif(NOT "${fname}" MATCHES "(\\.|=)(7z|tar|tar\\.bz2|tar\\.gz|tar\\.xz|tbz2|tgz|txz|zip)$")
+ elseif(no_extract)
+ get_filename_component(fname "${fname}" NAME)
+ else()
message(FATAL_ERROR "Could not extract tarball filename from url:\n ${url}")
endif()
string(REPLACE ";" "-" fname "${fname}")
-----------------------------------------------------------------------
Summary of changes:
Modules/ExternalProject.cmake | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list