summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-07-23 19:54:04 (GMT)
committerBrad King <brad.king@kitware.com>2014-07-29 13:32:27 (GMT)
commit56e6975ce98660c86690c5fb97e443402f4885a3 (patch)
treed0c73ab78d09e3ea4c81ca1be8351bbb29c07109 /Modules
parent98ea03443bea81188cfe55a885ac64c3ddd93b40 (diff)
downloadCMake-56e6975ce98660c86690c5fb97e443402f4885a3.zip
CMake-56e6975ce98660c86690c5fb97e443402f4885a3.tar.gz
CMake-56e6975ce98660c86690c5fb97e443402f4885a3.tar.bz2
ExternalProject: Recognize lzma-compressed files (#13515)
Add .7z, .tar.xz, and .txz file extensions. Inspired-by: Joke de Buhr <joke@seiken.de> Inspired-by: David Cole <DLRdave@aol.com>
Diffstat (limited to 'Modules')
-rw-r--r--Modules/ExternalProject.cmake10
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 8274a53..dbce9f4 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -737,7 +737,7 @@ endfunction()
function(_ep_write_extractfile_script script_filename name filename directory)
set(args "")
- if(filename MATCHES "(\\.|=)(tar\\.bz2|tar\\.gz|tbz2|tgz|zip)$")
+ if(filename MATCHES "(\\.|=)(7z|tar\\.bz2|tar\\.gz|tar\\.xz|tbz2|tgz|txz|zip)$")
set(args xfz)
endif()
@@ -746,7 +746,7 @@ function(_ep_write_extractfile_script script_filename name filename directory)
endif()
if(args STREQUAL "")
- message(SEND_ERROR "error: do not know how to extract '${filename}' -- known types are .tar, .tar.bz2, .tar.gz, .tbz2, .tgz and .zip")
+ message(SEND_ERROR "error: do not know how to extract '${filename}' -- known types are .7z, .tar, .tar.bz2, .tar.gz, .tar.xz, .tbz2, .tgz, .txz and .zip")
return()
endif()
@@ -1540,11 +1540,11 @@ function(_ep_add_download_command name)
if("x${fname}" STREQUAL "x")
string(REGEX MATCH "[^/\\?]*$" fname "${url}")
endif()
- if(NOT "${fname}" MATCHES "(\\.|=)(tar|tar\\.bz2|tar\\.gz|tbz2|tgz|zip)$")
- string(REGEX MATCH "([^/\\?]+(\\.|=)(tar|tar\\.bz2|tar\\.gz|tbz2|tgz|zip))/.*$" match_result "${url}")
+ 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}")
set(fname "${CMAKE_MATCH_1}")
endif()
- if(NOT "${fname}" MATCHES "(\\.|=)(tar|tar\\.bz2|tar\\.gz|tbz2|tgz|zip)$")
+ if(NOT "${fname}" MATCHES "(\\.|=)(7z|tar|tar\\.bz2|tar\\.gz|tar\\.xz|tbz2|tgz|txz|zip)$")
message(FATAL_ERROR "Could not extract tarball filename from url:\n ${url}")
endif()
string(REPLACE ";" "-" fname "${fname}")