[CMake] Re: Ignoring command return code in add_custom_command

Rodolfo Lima rodolfo at rodsoft.org
Fri Dec 14 07:13:14 EST 2007


Brandon Van Every escreveu:

> I think you will need to do a "COMMAND cmake -P myscript.cmake".
> myscript.cmake should contain an EXECUTE_PROCESS that does what you
> want, then interprets the return codes however you want.  Then you'd
> message(SEND_ERROR ...) or message(FATAL_ERROR ...) to indicate an
> abnormal result.  There were bugs regarding CMake script return codes
> once upon a time; hope those were fixed.

Thanks Brandon. Unfortunately this solution is a little ugly. That's
something that could be easily implemented if cmake supported Lua. The
command could be a lua function properly defined.
Thanks anyway.

rod



More information about the CMake mailing list