On 19/11/13 16:34, Brad King wrote:
>> * The "STATUS" variable is not set, therefore it is not useful;
>> * The "faulty" downloaded file is not removed.
>>
>> So I believe that there is no way to stop CMake, unless you perform
>> another hash check.
>
> The "this->SetError/return false" logic for these errors should be
> replaced by "this->IssueMessage(cmake::FATAL_ERROR,...)/return true"
> to switch it to a fatal error.  The signature should be extended
> to provide an option to get the error information back without
> causing a CMake Error so that the caller can handle it.

What about setting the STATUS variable to
"some number different from 0;<algo> check failed" instead?
In this way the default behaviour won't change and there is no need to
extend the signature, but if you check the STATUS variable, you will be
able to issue a fatal error.
Also if download fails in some other way, the error raised is not fatal,
therefore in this way it looks more coherent.

Daniele
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to