[CMake] How to fetch exit status of INSTALL(CODE ...)

Marcel Loose loose at astron.nl
Wed Jul 20 03:47:27 EDT 2011


Hi all,

I have a macro that, during install, compiles python source files to
byte code. Sometimes, there's a syntax error in the python source that
can be caught during compilation; i.e. during the execution of
INSTALL(CODE ...).

Is is possible to somehow fetch the exit status of commands executed
inside INSTALL(CODE ...), so that I can let 'make install' exit with a
non-zero exit status?

Best regards,
Marcel Loose.

-- 
Marcel Loose
Senior Software Engineer, Computing Group R&D, Astron, the Netherlands



More information about the CMake mailing list