Re: [cmake-developers] BundleUtilities check exit code

2015-02-11 Thread Ruslan Baratov via cmake-developers

On 10-Feb-15 19:01, Brad King wrote:

On 02/09/2015 12:17 PM, Ruslan Baratov via cmake-developers wrote:

This patch let do the check that exit code is 0, i.e. install_name_tool
exits successfully.

Applied with minor refactoring:

  BundleUtilities: Teach fixup_bundle to check install_name_tool result
  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a27c13f4

Please verify that this version of the change still works for you.

Thanks, version a27c13f4 catches error correctly.

Ruslo
--

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


Re: [cmake-developers] BundleUtilities check exit code

2015-02-10 Thread Brad King
On 02/09/2015 12:17 PM, Ruslan Baratov via cmake-developers wrote:
 This patch let do the check that exit code is 0, i.e. install_name_tool 
 exits successfully.

Applied with minor refactoring:

 BundleUtilities: Teach fixup_bundle to check install_name_tool result
 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a27c13f4

Please verify that this version of the change still works for you.

Thanks,
-Brad
-- 

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


[cmake-developers] BundleUtilities check exit code

2015-02-09 Thread Ruslan Baratov via cmake-developers

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