[CMake] INSTALL CODE Error Results and Termination
David Hauck
davidh at netacquire.com
Wed Nov 13 13:12:26 EST 2013
Hello,
I've been using several "install (CODE "EXECUTE_PROCESS ...")" constructs in my top-level CMakeLists.txt file. However, I've been unable to capture/operate on any exit status of the embedded command. Unfortunately, documentation/searches haven't turned up any useful pointers. The closest I've come is a pointer in the following thread:
http://www.cmake.org/pipermail/cmake/2011-July/045475.html
However, I've not been able to sufficiently read between the lines to get this working.
Does anyone have any thoughts on how to get something like the following working:
install (CODE "EXECUTE_PROCESS (
COMMAND ant ...
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}/java
ERROR_VARIABLE _err
)
If (${_err})
MESSAGE( FATAL_ERROR \"err: ${_err}\")
endif ()")
Thanks!
-David
More information about the CMake
mailing list