[CMake] Ignoring command return code in add_custom_command

Rodolfo Lima rodolfo at rodsoft.org
Thu Dec 13 23:05:39 EST 2007


Hi, is there a way to inform cmake that it should ignore the return code
of the command specified with add_custom_command? I want the command to
be successful, even if it returns something different than 0.

For instance:
add_custom_command(OUTPUT text.cpp COMMAND false)
add_executable(test main.cpp text.cpp)

I'm using on linux, using Makefiles, and it bails off because 'false' is
returning 1. What if that's an expected behavior? Is there any way to
circumvent this?

Regards,
rod



More information about the CMake mailing list