Skip to content

Commit

Permalink
use fatal errors for install failures to help debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
ahoopes committed Feb 19, 2021
1 parent 18b9d49 commit 69470df
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions cmake/functions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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)
Expand All @@ -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()
Expand All @@ -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()
Expand Down

0 comments on commit 69470df

Please sign in to comment.