Hi Marcel,<br><br>Aware I won't be answering your question regarding the exit code associated with INSTALL(CODE ...), I still would like to suggest you an approach that could help you addressing your issue.<br><br>What about byte-compiling the python source at build time ? In that case, the build step would fail instead ... <br>
<br>You could look at macro like this one to help you: See <a href="https://github.com/commontk/CTK/blob/master/CMake/ctkMacroCompilePythonScript.cmake">https://github.com/commontk/CTK/blob/master/CMake/ctkMacroCompilePythonScript.cmake</a><br>
<br>Hth<br>Jc<br><br><div class="gmail_quote">On Wed, Jul 20, 2011 at 3:47 AM, Marcel Loose <span dir="ltr"><<a href="mailto:loose@astron.nl">loose@astron.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi all,<br>
<br>
I have a macro that, during install, compiles python source files to<br>
byte code. Sometimes, there's a syntax error in the python source that<br>
can be caught during compilation; i.e. during the execution of<br>
INSTALL(CODE ...).<br>
<br>
Is is possible to somehow fetch the exit status of commands executed<br>
inside INSTALL(CODE ...), so that I can let 'make install' exit with a<br>
non-zero exit status?<br>
<br>
Best regards,<br>
Marcel Loose.<br>
<br>
--<br>
Marcel Loose<br>
Senior Software Engineer, Computing Group R&D, Astron, the Netherlands<br>
<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>+1 919 869 8849<br><br>