[CMake] RESULT_VARIABLE of excecute_process inside install() not getting value

Jacob Avraham jacob at compass-eos.com
Mon Sep 6 10:05:41 EDT 2010


Hi,
I'm trying to get a return value of a script that I runs from execute_process() command, 
as part of an install() command, and I don't see that the return variable is getting any value.
I'm doing something like:
install(CODE "
execute_process(COMMAND my_script
                RESULT_VARIABLE ret_val)
MESSAGE(\"install return value is ${ret_val}\")
")

It does work when not included in an install CODE segment.

Any idea how to get the make to abort when my_script fails?

Thanks,

Jacob


More information about the CMake mailing list