summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-07-23 15:02:42 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-07-23 15:02:57 (GMT)
commit21835a2cea52d5518762bab87d466387b8fb936b (patch)
tree645061e4f8119326d2c248b88810134b161d0f26
parent33dec05375558e99a6e2947e036f84a7a6315781 (diff)
parent22554c3166aaf7feaebf02b0ddc1204f13b22e3c (diff)
downloadCMake-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.cmake5
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}")