diff options
author | Ruslan Baratov <ruslan_baratov@yahoo.com> | 2015-02-09 17:09:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-02-10 16:00:27 (GMT) |
commit | a27c13f4cad2247833d048ec5e334861943fd4d9 (patch) | |
tree | e8b04e542a5456eb0954aa6fe3890fcb9d9f5b19 /Modules/BundleUtilities.cmake | |
parent | 2fd44b082b0a8e546c73d921f9d8264a668c3b78 (diff) | |
download | CMake-a27c13f4cad2247833d048ec5e334861943fd4d9.zip CMake-a27c13f4cad2247833d048ec5e334861943fd4d9.tar.gz CMake-a27c13f4cad2247833d048ec5e334861943fd4d9.tar.bz2 |
BundleUtilities: Teach fixup_bundle to check install_name_tool result
Fail explicitly if install_name_tool fails to make an update we need.
Diffstat (limited to 'Modules/BundleUtilities.cmake')
-rw-r--r-- | Modules/BundleUtilities.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index fee0a7c..ce90f30 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -776,7 +776,12 @@ function(fixup_bundle_item resolved_embedded_item exepath dirs) # to install_name_tool: # if(changes) - execute_process(COMMAND install_name_tool ${changes} "${resolved_embedded_item}") + set(cmd install_name_tool ${changes} "${resolved_embedded_item}") + execute_process(COMMAND ${cmd} RESULT_VARIABLE install_name_tool_result) + if(NOT install_name_tool_result EQUAL 0) + string(REPLACE ";" "' '" msg "'${cmd}'") + message(FATAL_ERROR "Command failed:\n ${msg}") + endif() endif() endfunction() |