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 <[email protected]>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 >
-- 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
