<div dir="ltr">Thanks for the info, Craig. <div><br></div><div>I'm not very familiar with the intricacies of network downloads. If the download itself guarantees the file was transferred correctly and the checksum is only be used to verify its authenticity, then we probably don't need it as we're only downloading these artifacts from trusted internal sources. However, if the checksums need to be used in some cases to verify the download was actually received and is in one correct piece then pulling the checksum file and basically failing if either is corrupted is fine for our use case. Can we assume the former, that CMake (and the underlying tools) will guarantee the file is downloaded successfully even in the event of a CTRL-C interruption or other signals?<div><div><br></div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jul 21, 2019 at 3:49 AM Craig Scott <<a href="mailto:craig.scott@crascit.com">craig.scott@crascit.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 17, 2019 at 12:59 PM Dustyn Blasig <<a href="mailto:dustyn@blasig.us" target="_blank">dustyn@blasig.us</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div>We are pulling some artifacts from Artifactory which provides a checksum file along with the artifacts at <artifact-url>.md5 or .sha256. If I do not include URL_HASH, does CMake automatically check to see if such a checksum file exists and use it's value for the hash check? Or is there a way to provide a URL for the checksum file rather than having to do file(DOWNLOAD <checksum>), file(STRING <checksum-file>), URL_HASH=<checksum-var>?</div></div></blockquote><div><br></div><div>The point of the checksum file is to verify the file downloaded. It doesn't make a whole lot of sense to then download another file to provide that checksum, you'd just be moving the problem along one level of indirection. The assumption is when you provide the URL to be downloaded, if you want to use a checksum then you should also be able to provide that along with the URL. When the URL is being constructed on-the-fly though, this isn't typically true. In that case, you can't typically provide a checksum that isn't itself downloaded and therefore needs to be verified itself.</div><div><br></div><div>To more directly answer your question, CMake doesn't offer any feature to automatically download a checksum file (that I'm aware of). The file command expects that actual checksum, not a location for where to retrieve it from for the reasons mentioned above.</div><div> </div></div>-- <br><div dir="ltr" class="gmail-m_7139791239302012633gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr">Craig Scott<br><div>Melbourne, Australia</div><div><a href="https://crascit.com" target="_blank">https://crascit.com</a><br></div><div><br></div><div>Get the hand-book for every CMake user: <a href="https://crascit.com/professional-cmake/" target="_blank">Professional CMake: A Practical Guide</a><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</blockquote></div>