Surprising behavior of file(DOWNLOAD) for non-existent file
Hi,
$ cat dl.cmake
file(DOWNLOAD "http://cmake.org/does-not-exist/file.tar.gz" "./file.tar.gz" SHOW_PROGRESS)
$ cmake -P dl.cmake
-- [download 100% complete]
$ ls
dl.cmake file.tar.gz
This behavior is surprising (and undocumented) in two ways:
-
[download 100% complete]
is a misleading statement of what has actually happened; -
file.tar.gz
(length 0 bytes) is created even though it has not been found.
Could both get fixed, please?
Cheers, Axel.