If CMake is running a script via -P, doesn't it return a non-zero
status if there's any error?
I'd think it would be sufficient to run to the end of the script if
everything works fine, but have something like
if(something_went_wrong)
message(FATAL_ERROR "¡OH NO! ¡SUCEDIO ALGO TERRIBLE!!!")
end
On Jun 22, 2012, at 4:25 PM, David Cole wrote:
As an alternative (workaround), perhaps you could write the status value into a
file that you inspect after CMake returns?
Unfortunately this is not possible because who calls by script is ctest.
Then it should definitely be possible.
I meant
On Fri, Jun 22, 2012 at 10:15 AM, Pere Mato Vila wrote:
> Thanks very much for you prompt answer.
>
>
> As an alternative (workaround), perhaps you could write the status value
> into a file that you inspect after CMake returns?
>
>
> Unfortunately this is not possible because who calls by scr
Thanks very much for you prompt answer.
As an alternative (workaround), perhaps you could write the status value into a
file that you inspect after CMake returns?
Unfortunately this is not possible because who calls by script is ctest.
Cheers,
Pere
---
Presently, there is no way to do that. It would be a reasonable feature
request to add an "EXIT_STATUS" or "EXIT_CODE" parameter to the message
command to enable this functionality.
As an alternative (workaround), perhaps you could write the status value
into a file that you inspect after CMake re
Hi,
Perhaps this is a trivial question. Is there a way to return a specific error
code from a CMake script ( -P option)? The only way I know to return a
failure is by calling message(FATAL_ERROR ...) and this returns rc = 1, but I
would like to return the error I got from the underlying proc