summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-07-23 19:52:51 (GMT)
committerBrad King <brad.king@kitware.com>2014-07-29 13:29:57 (GMT)
commit98ea03443bea81188cfe55a885ac64c3ddd93b40 (patch)
treec4453356f4b0b53362352bc0facdbac57546be82
parent38065563b6fb0093004d0c89b5de0f82a76b5a31 (diff)
downloadCMake-98ea03443bea81188cfe55a885ac64c3ddd93b40.zip
CMake-98ea03443bea81188cfe55a885ac64c3ddd93b40.tar.gz
CMake-98ea03443bea81188cfe55a885ac64c3ddd93b40.tar.bz2
ExternalProject: Recognize .tbz2 extension
Also fix .bz2 extension to be .tar.bz2 since we only support compressed tarballs and not plain compressed files. Suggested-by: Nils Gladitz <nilsgladitz@gmail.com> Suggested-by: Rolf Eike Beer <eike@sf-mail.de>
-rw-r--r--Modules/ExternalProject.cmake10
1 files changed, 5 insertions, 5 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index 0d35cca..8274a53 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 "(\\.|=)(bz2|tar\\.gz|tgz|zip)$")
+ if(filename MATCHES "(\\.|=)(tar\\.bz2|tar\\.gz|tbz2|tgz|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 .bz2, .tar, .tar.gz, .tgz and .zip")
+ message(SEND_ERROR "error: do not know how to extract '${filename}' -- known types are .tar, .tar.bz2, .tar.gz, .tbz2, .tgz 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 "(\\.|=)(bz2|tar|tgz|tar\\.gz|zip)$")
- string(REGEX MATCH "([^/\\?]+(\\.|=)(bz2|tar|tgz|tar\\.gz|zip))/.*$" match_result "${url}")
+ 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}")
set(fname "${CMAKE_MATCH_1}")
endif()
- if(NOT "${fname}" MATCHES "(\\.|=)(bz2|tar|tgz|tar\\.gz|zip)$")
+ if(NOT "${fname}" MATCHES "(\\.|=)(tar|tar\\.bz2|tar\\.gz|tbz2|tgz|zip)$")
message(FATAL_ERROR "Could not extract tarball filename from url:\n ${url}")
endif()
string(REPLACE ";" "-" fname "${fname}")