[CMake] file( DOWNLOAD ) problem

David Cole david.cole at kitware.com
Wed Sep 26 18:07:58 EDT 2012


With file(DOWNLOAD, you should always use the EXPECTED_MD5 argument
(or EXPECTED_HASH with nightly CMake, or 2.8.10 or later) to verify success.

HTH,
David


On Wed, Sep 26, 2012 at 5:40 PM, Robert Dailey <rcdailey.lists at gmail.com>wrote:

> I'm using the file( DOWNLOAD ) command to download some files from an
> FTP server. I notice that if I  put a completely invalid URL to a
> file, the destination file is still created in Windows with a size of
> 0 bytes. This tricks my logic into thinking the download was
> successful (since I only check if the destination file exists). Is
> this a bug or a feature? If it's a feature, what is a reliable way I
> can determine if the download succeeded?
> --
>
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120926/0c661fbd/attachment.htm>


More information about the CMake mailing list