From 31c2f9ab605548beee6c090571868c565bf3d04f Mon Sep 17 00:00:00 2001 From: maier Date: Wed, 3 Apr 2013 15:29:44 +0000 Subject: [PATCH] CMake: Bugfix, expose run failure to outside world git-svn-id: https://svn.dealii.org/trunk@29162 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake b/deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake index 376ba81509..373fb2fe60 100644 --- a/deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake +++ b/deal.II/cmake/macros/macro_deal_ii_invoke_autopilot.cmake @@ -59,7 +59,12 @@ MACRO(DEAL_II_INVOKE_AUTOPILOT) # FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/run_target.cmake "SET(ENV{PATH} \"${DEAL_II_PATH}/${DEAL_II_LIBRARY_RELDIR}:\$ENV{PATH}\")\n" - "EXECUTE_PROCESS(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_RUN})" + "EXECUTE_PROCESS(COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${TARGET_RUN}\n" + " RESULT_VARIABLE _return_value\n" + " )\n" + "IF(NOT \"\${_return_value}\" STREQUAL "0")\n" + " MESSAGE(SEND_ERROR \"\nProgram terminated with exit code: \${_return_value}\")\n" + "ENDIF()\n" ) ADD_CUSTOM_TARGET(run COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/run_target.cmake -- 2.39.5