Merge topic 'ExternalProject-default-download-filename'
af7da934
ExternalProject: Use default file name if extracting from URL fails
This commit is contained in:
commit
73a8c2b3d6
|
@ -1878,7 +1878,12 @@ function(_ep_add_download_command name)
|
||||||
elseif(no_extract)
|
elseif(no_extract)
|
||||||
get_filename_component(fname "${fname}" NAME)
|
get_filename_component(fname "${fname}" NAME)
|
||||||
else()
|
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()
|
endif()
|
||||||
string(REPLACE ";" "-" fname "${fname}")
|
string(REPLACE ";" "-" fname "${fname}")
|
||||||
set(file ${download_dir}/${fname})
|
set(file ${download_dir}/${fname})
|
||||||
|
|
Loading…
Reference in New Issue