diff options
author | Brad King <brad.king@kitware.com> | 2018-07-23 15:02:42 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-07-23 15:02:57 (GMT) |
commit | 21835a2cea52d5518762bab87d466387b8fb936b (patch) | |
tree | 645061e4f8119326d2c248b88810134b161d0f26 | |
parent | 33dec05375558e99a6e2947e036f84a7a6315781 (diff) | |
parent | 22554c3166aaf7feaebf02b0ddc1204f13b22e3c (diff) | |
download | CMake-21835a2cea52d5518762bab87d466387b8fb936b.zip CMake-21835a2cea52d5518762bab87d466387b8fb936b.tar.gz CMake-21835a2cea52d5518762bab87d466387b8fb936b.tar.bz2 |
Merge topic 'BundleUtilities-otool-l-error'
22554c3166 BundleUtilities: message(FATAL_ERROR) on otool -l error
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2227
-rw-r--r-- | Modules/BundleUtilities.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake index 121a8f0..4727f03 100644 --- a/Modules/BundleUtilities.cmake +++ b/Modules/BundleUtilities.cmake @@ -421,7 +421,12 @@ function(get_item_rpaths item rpaths_var) execute_process( COMMAND "${otool_cmd}" -l "${item}" OUTPUT_VARIABLE load_cmds_ov + RESULT_VARIABLE otool_rv + ERROR_VARIABLE otool_ev ) + if(NOT otool_rv STREQUAL "0") + message(FATAL_ERROR "otool -l failed: ${otool_rv}\n${otool_ev}") + endif() string(REGEX REPLACE "[^\n]+cmd LC_RPATH\n[^\n]+\n[^\n]+path ([^\n]+) \\(offset[^\n]+\n" "rpath \\1\n" load_cmds_ov "${load_cmds_ov}") string(REGEX MATCHALL "rpath [^\n]+" load_cmds_ov "${load_cmds_ov}") string(REGEX REPLACE "rpath " "" load_cmds_ov "${load_cmds_ov}") |