On Mon, Jul 22, 2019, at 11:51 AM, Dustyn Blasig wrote:
> *"I don't think it is realistic to expect CMake or the underlying tools to
> still give you a successful file download if you interrupt it. ;)"*
>
> Sorry, I didn't word that well : )
>
> I was curious if CMake uses handlers behind the scenes similar to GNU Make
> such that if a signal occurs it will cleanup any partially-written files so
> the next time you build it will retry those targets. In this case, if the
> download is interrupted, will CMake know it needs to redo the download? Are
> the checksum files used to verify the download was successful, or really only
> useful for authenticity like the man-in-the-middle attacks?
>
> I definitely like the download and configure once and reuse the download
> offline part, that is useful!
>
I recall FetchContent being smart enough to determine that it was interrupted
by user. The time stamps typically don't get updated until after successfully
completing the fetch and configure. So it’ll just redo the pieces that needs to
be updated or didn’t run in the first place.
The checksums are used to verify the download was successful. Typical Ethernet
and TCP/IP is not robust enough to detect single bit errors in large downloads.
It’s one of the reasons why md5sum accompanies ISO downloads. Less of an issue
with small items but still can happen.
One reason for not downloading checksum file is that you don’t know if package
had an issue or if the checksum file had an issue. You wouldn’t want to
download a large file because the checksum file had an error.
I can see how having this feature would be beneficial to you but you may just
be forced to download checksum independently and parse it first. Then use
contents for the real item to be downloaded.
—
F
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake