summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-07-08 13:17:16 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-07-08 13:17:16 (GMT)
commit73a8c2b3d687a41079ff5c019ccee9c2e689a122 (patch)
tree06c785e03cd12444e2a1b15b970e073a58407f3b
parent2c2e0abfb04ae9444617015f3b7bbe0860897921 (diff)
parentaf7da934a70d2d694cb378db9283eff1859b2747 (diff)
downloadCMake-73a8c2b3d687a41079ff5c019ccee9c2e689a122.zip
CMake-73a8c2b3d687a41079ff5c019ccee9c2e689a122.tar.gz
CMake-73a8c2b3d687a41079ff5c019ccee9c2e689a122.tar.bz2
Merge topic 'ExternalProject-default-download-filename'
af7da934 ExternalProject: Use default file name if extracting from URL fails
-rw-r--r--Modules/ExternalProject.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake
index ee517f6..3686fb6 100644
--- a/Modules/ExternalProject.cmake
+++ b/Modules/ExternalProject.cmake
@@ -1878,7 +1878,12 @@ function(_ep_add_download_command name)
elseif(no_extract)
get_filename_component(fname "${fname}" NAME)
else()
- message(FATAL_ERROR "Could not extract tarball filename from url:\n ${url}")
+ # Fall back to a default file name. The actual file name does not
+ # matter because it is used only internally and our extraction tool
+ # inspects the file content directly. If it turns out the wrong URL
+ # was given that will be revealed during the build which is an easier
+ # place for users to diagnose than an error here anyway.
+ set(fname "archive.tar")
endif()
string(REPLACE ";" "-" fname "${fname}")
set(file ${download_dir}/${fname})