summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorHarry Mallon <hjmallon@gmail.com>2018-07-20 11:06:04 (GMT)
committerHarry Mallon <hjmallon@gmail.com>2018-07-20 11:06:04 (GMT)
commit22554c3166aaf7feaebf02b0ddc1204f13b22e3c (patch)
treeb09fd145bf21b0b80b42e071f53a43eef498c65f /Modules
parent56148cb98f546a3a38bb6f9b191e753f8c8dd9df (diff)
downloadCMake-22554c3166aaf7feaebf02b0ddc1204f13b22e3c.zip
CMake-22554c3166aaf7feaebf02b0ddc1204f13b22e3c.tar.gz
CMake-22554c3166aaf7feaebf02b0ddc1204f13b22e3c.tar.bz2
BundleUtilities: message(FATAL_ERROR) on otool -l error
Diffstat (limited to 'Modules')
-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}")