diff options
author | Ruslan Baratov <ruslan_baratov@yahoo.com> | 2016-07-05 13:17:12 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-07-07 13:35:42 (GMT) |
commit | af7da934a70d2d694cb378db9283eff1859b2747 (patch) | |
tree | c71f7778004305072bbec97fb1b3608d34de2796 /Modules/ExternalProject.cmake | |
parent | 972f24ea942d54b262ba9eed2b436bbd55ad5034 (diff) | |
download | CMake-af7da934a70d2d694cb378db9283eff1859b2747.zip CMake-af7da934a70d2d694cb378db9283eff1859b2747.tar.gz CMake-af7da934a70d2d694cb378db9283eff1859b2747.tar.bz2 |
ExternalProject: Use default file name if extracting from URL fails
The download/extract step uses the file name only internally so we can
just use a fallback default name if one cannot be extracted from the
URL.
Diffstat (limited to 'Modules/ExternalProject.cmake')
-rw-r--r-- | Modules/ExternalProject.cmake | 7 |
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}) |