Hi,
This patch let do the check that exit code is 0, i.e. install_name_tool
exits successfully.
Ruslan
From 74a52160f7b74907acfcbca91b925ea5589019b7 Mon Sep 17 00:00:00 2001
From: Ruslan Baratov <ruslan_bara...@yahoo.com>
Date: Mon, 9 Feb 2015 20:09:41 +0300
Subject: [PATCH] fixup_bundle: check execute_process succeed
---
Modules/BundleUtilities.cmake | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/Modules/BundleUtilities.cmake b/Modules/BundleUtilities.cmake
index fee0a7c..ad145eb 100644
--- a/Modules/BundleUtilities.cmake
+++ b/Modules/BundleUtilities.cmake
@@ -776,7 +776,18 @@ 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}")
+ execute_process(
+ COMMAND install_name_tool ${changes} "${resolved_embedded_item}"
+ RESULT_VARIABLE install_name_tool_result
+ )
+ if(NOT install_name_tool_result EQUAL 0)
+ set(msg install_name_tool ${changes} "${resolved_embedded_item}")
+ set(oneline "")
+ foreach(word ${msg})
+ set(oneline "${oneline} ${word}")
+ endforeach()
+ message(FATAL_ERROR "Command failed: ${oneline}")
+ endif()
endif()
endfunction()
--
1.9.3 (Apple Git-50)
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers