From 69470dff4049294748e2d3b8cb9083a3c5cb4231 Mon Sep 17 00:00:00 2001 From: Andrew Hoopes Date: Fri, 19 Feb 2021 17:01:53 -0500 Subject: [PATCH] use fatal errors for install failures to help debugging --- cmake/functions.cmake | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/cmake/functions.cmake b/cmake/functions.cmake index 4dcdbd8bbe9..b5024a47950 100644 --- a/cmake/functions.cmake +++ b/cmake/functions.cmake @@ -95,8 +95,7 @@ function(install_tarball) RESULT_VARIABLE retcode ) if(NOT \${retcode} STREQUAL 0) - # message(FATAL_ERROR \"Could not extract ${INSTALL_UNPARSED_ARGUMENTS} - perhaps it hasn't been downloaded from the annex?\") - message(SEND_ERROR \"Could not extract ${INSTALL_UNPARSED_ARGUMENTS} - perhaps it hasn't been downloaded from the annex?\") + message(FATAL_ERROR \"Could not extract ${INSTALL_UNPARSED_ARGUMENTS} - perhaps it hasn't been downloaded from the annex?\") endif()" ) endfunction() @@ -119,8 +118,7 @@ function(mac_deploy_qt) message(STATUS \"Deploying ${APP_BUNDLE}\") execute_process(COMMAND bash -c \"${CMAKE_SOURCE_DIR}/qt/mac_deploy ${Qt5_INSTALL_DIR} ${CMAKE_INSTALL_PREFIX}/${APP_BUNDLE}\" RESULT_VARIABLE retcode) if(NOT \${retcode} STREQUAL 0) - # message(FATAL_ERROR \"Could not deploy ${APP_TARGET}\") - message(SEND_ERROR \"Could not deploy ${APP_TARGET}\") + message(FATAL_ERROR \"Could not deploy ${APP_TARGET}\") endif()" ) endfunction() @@ -157,8 +155,7 @@ function(install_append_help SCRIPT HELPTEXT DESTINATION) RESULT_VARIABLE retcode ) if(NOT \${retcode} STREQUAL 0) - # message(FATAL_ERROR \"Could not append help text to ${SCRIPT}\") - message(SEND_ERROR \"Could not append help text to ${SCRIPT}\") + message(FATAL_ERROR \"Could not append help text to ${SCRIPT}\") endif()" ) install(FILES ${HELPTEXT} DESTINATION docs/xml) @@ -179,8 +176,7 @@ function(install_osx_app APP_PATH) RESULT_VARIABLE retcode ) if(NOT \${retcode} STREQUAL 0) - # message(FATAL_ERROR \"Could not install ${APP_NAME}\") - message(SEND_ERROR \"Could not install ${APP_NAME}\") + message(FATAL_ERROR \"Could not install ${APP_NAME}\") endif()" ) endfunction() @@ -193,8 +189,7 @@ function(symlink TARGET LINKNAME) message(STATUS \"Symlinking: ${LINKNAME} to ${TARGET}\") execute_process(COMMAND bash -c \"mkdir -p $(dirname ${LINKNAME}) && rm -f ${LINKNAME} && ln -s ${TARGET} ${LINKNAME}\" RESULT_VARIABLE retcode) if(NOT \${retcode} STREQUAL 0) - # message(FATAL_ERROR \"Could not create symlink to ${TARGET}\") - message(SEND_ERROR \"Could not create symlink to ${TARGET}\") + message(FATAL_ERROR \"Could not create symlink to ${TARGET}\") endif()" ) endfunction()