Aah, of course. Didn't think hard enough about this problem.

However, if the command fails during make, I would assume that make
would exit prematurely with an error status, but that didn't happen.

Am I overlooking something?

Regards,
Marcel Loose.

On Thu, 2009-06-25 at 09:14 -0700, Tyler Roscoe wrote:
> On Thu, Jun 25, 2009 at 12:23:33PM +0200, Marcel Loose wrote:
> > I have defined a custom command with add_custom_command(), and the
> > command inside may fail.
> > 
> > Is there a way to retrieve the error status of such a failing command,
> > like with RESULT_VARIABLE in execute_process()?
> 
> Your custom_command will run at make time, not CMake time, so what do
> you want to do with the return value? Who do you want to give it to?
> 
> A quick hack might be to write the return code into a file, then have
> another script that reads the file and proceeds based on the value from
> the file.
> 
> tyler

_______________________________________________
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://www.cmake.org/mailman/listinfo/cmake

Reply via email to