What if you do something this...? What do status and log tell you?<div><br></div><div>set(remote "http://......")</div><div>set(local "some file name")</div><div><br><div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24">
file(DOWNLOAD</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24"> "${remote}"</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24"> "${local}"</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24"> STATUS status</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24"> LOG log)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24; min-height: 16.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24">list(GET status 0 status_code)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24">list(GET status 1 status_string)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24; min-height: 16.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24">if(NOT status_code EQUAL 0)</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24"> message(FATAL_ERROR "error: downloading '${remote}' failed</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24"> status_code: ${status_code}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24"> status_string: ${status_string}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24"> log: ${log}</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24">")</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24">endif()</p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24; min-height: 16.0px"><br></p>
<p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #da2e24"><font class="Apple-style-span" color="#000000" face="arial"><span class="Apple-style-span" style="font-size: small;"><font class="Apple-style-span" color="#DA2E24" face="Menlo" size="4"><span class="Apple-style-span" style="font-size: 14px;"><br>
</span></font></span></font></p><div class="gmail_quote">On Fri, Jun 4, 2010 at 4:00 AM, Michael Wild <span dir="ltr"><<a href="mailto:themiwi@gmail.com">themiwi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
When downloading something from <a href="http://downloads.sourceforge.net/." target="_blank">http://downloads.sourceforge.net/.</a>.. you always get a 302 redirect to one of the many mirror servers. Unfortunately, it seems that file(DOWNLOAD ...) doesn't follow the redirect, but just stops and leaves an empty file behind. No error, no nothing. Is this intentional?<br>
<br>
I'd rather not use a specific mirror...<br>
<br>
Michael<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div></div>