Re: [cmake-developers] [patch] iOS combined, some fixes

2016-06-25 Thread Ruslan Baratov via cmake-developers

Great, thank you!

On 25-Jun-16 14:56, Gregor Jasny wrote:

On 21/06/16 18:48, Ruslan Baratov wrote:

Is the patch applied? Let me know if there are any questions left about it.

Pushed into next. Sorry for the delay.





--

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] [patch] iOS combined, some fixes

2016-06-25 Thread Gregor Jasny via cmake-developers
On 21/06/16 18:48, Ruslan Baratov wrote:
> Is the patch applied? Let me know if there are any questions left about it.

Pushed into next. Sorry for the delay.



-- 

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] [patch] iOS combined, some fixes

2016-06-21 Thread Ruslan Baratov via cmake-developers

Is the patch applied? Let me know if there are any questions left about it.

On 15-Jun-16 23:38, Ruslan Baratov via cmake-developers wrote:

On 15-Jun-16 22:59, Gregor Jasny wrote:

Hello,

Thanks for the patch!

On 15/06/16 16:41, Ruslan Baratov wrote:

Sending some fixes found by testing with Xcode 7.3

We were chasing some errors regarding the unified build some time ago.
But it appeared some for of heisenbug: the more I looked the less likely
it happened.

Is the error 100% reproducible for you?

Yes - for the Travis VM with xcode7.3 image. Not - for my local machine.


  And do you know what goes wrong?
Yes, I've leaved a note in the comments section. There are some 
messages in error stream, they are not related to lipo location. Here 
is example of the log with error:


CMake Error at

/Users/travis/build/ingenue/hunter/_ci/cmake/share/cmake-3.5/Modules/CMakeIOSInstallCombined.cmake:102
(message):
Command failed (File name too long): 2016-05-31 18:37:15.058
xcodebuild[6590:18239] Build settings from command line:
2016-05-31 18:37:15.059 xcodebuild[6590:18239] TOOLCHAINS =
com.apple.dt.toolchain.XcodeDefault
2016-05-31 18:37:15.059 xcodebuild[6590:18239]
XCODE_DEFAULT_TOOLCHAIN_OVERRIDE =

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo;-info;/Users/travis/build/ingenue/hunter/_testing/Hunter/_Base/7f9eaa4/f53c868/1c14a4b/Build/GTest/Build/GTest-Release-prefix/src/GTest-Release-build/googlemock/Release-iphonesimulator/libgmock.a



Does the

list(LENGTH _lipo_path len)
if(NOT len EQUAL 1)

take paths with spaces into account?
Nope as far as I know. In fact it doesn't catch the error I've seen, I 
decide to add some sanity checks just to be sure.


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] [patch] iOS combined, some fixes

2016-06-15 Thread Ruslan Baratov via cmake-developers

On 15-Jun-16 22:59, Gregor Jasny wrote:

Hello,

Thanks for the patch!

On 15/06/16 16:41, Ruslan Baratov wrote:

Sending some fixes found by testing with Xcode 7.3

We were chasing some errors regarding the unified build some time ago.
But it appeared some for of heisenbug: the more I looked the less likely
it happened.

Is the error 100% reproducible for you?

Yes - for the Travis VM with xcode7.3 image. Not - for my local machine.


  And do you know what goes wrong?
Yes, I've leaved a note in the comments section. There are some messages 
in error stream, they are not related to lipo location. Here is example 
of the log with error:


   CMake Error at
   
/Users/travis/build/ingenue/hunter/_ci/cmake/share/cmake-3.5/Modules/CMakeIOSInstallCombined.cmake:102
   (message):
   Command failed (File name too long): 2016-05-31 18:37:15.058
   xcodebuild[6590:18239] Build settings from command line:
   2016-05-31 18:37:15.059 xcodebuild[6590:18239] TOOLCHAINS =
   com.apple.dt.toolchain.XcodeDefault
   2016-05-31 18:37:15.059 xcodebuild[6590:18239]
   XCODE_DEFAULT_TOOLCHAIN_OVERRIDE =
   
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain
   
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo;-info;/Users/travis/build/ingenue/hunter/_testing/Hunter/_Base/7f9eaa4/f53c868/1c14a4b/Build/GTest/Build/GTest-Release-prefix/src/GTest-Release-build/googlemock/Release-iphonesimulator/libgmock.a




Does the

list(LENGTH _lipo_path len)
if(NOT len EQUAL 1)

take paths with spaces into account?
Nope as far as I know. In fact it doesn't catch the error I've seen, I 
decide to add some sanity checks just to be sure.


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] [patch] iOS combined, some fixes

2016-06-15 Thread Gregor Jasny via cmake-developers
Hello,

Thanks for the patch!

On 15/06/16 16:41, Ruslan Baratov wrote:
> Sending some fixes found by testing with Xcode 7.3

We were chasing some errors regarding the unified build some time ago.
But it appeared some for of heisenbug: the more I looked the less likely
it happened.

Is the error 100% reproducible for you? And do you know what goes wrong?

Does the

   list(LENGTH _lipo_path len)
   if(NOT len EQUAL 1)

take paths with spaces into account?

Thanks,
Gregor

-- 

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] [patch] iOS combined, some fixes

2016-06-15 Thread Ruslan Baratov via cmake-developers

Hi,

Sending some fixes found by testing with Xcode 7.3

Ruslo
>From 2026570b6f3c7c950ffbb83effa5a176d9133c89 Mon Sep 17 00:00:00 2001
From: Ruslan Baratov 
Date: Tue, 14 Jun 2016 23:44:41 +0300
Subject: [PATCH 1/2] CMakeIOSInstallCombined: add some sanity checks

---
 Modules/CMakeIOSInstallCombined.cmake | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/Modules/CMakeIOSInstallCombined.cmake b/Modules/CMakeIOSInstallCombined.cmake
index 1256f56..e2a0fee 100644
--- a/Modules/CMakeIOSInstallCombined.cmake
+++ b/Modules/CMakeIOSInstallCombined.cmake
@@ -251,6 +251,13 @@ function(ios_install_combined target destination)
 )
   endif()
   set(_lipo_path ${output})
+  list(LENGTH _lipo_path len)
+  if(NOT len EQUAL 1)
+message(FATAL_ERROR "Unexpected xcrun output: ${_lipo_path}")
+  endif()
+  if(NOT EXISTS "${_lipo_path}")
+message(FATAL_ERROR "File not found: ${_lipo_path}")
+  endif()
 
   set(CURRENT_CONFIG "${CMAKE_INSTALL_CONFIG_NAME}")
   set(CURRENT_TARGET "${target}")
-- 
2.7.4 (Apple Git-66)

>From ea14e3f5c019fda1cba449f66df879d651b43cef Mon Sep 17 00:00:00 2001
From: Ruslan Baratov 
Date: Wed, 15 Jun 2016 00:16:03 +0300
Subject: [PATCH 2/2] CMakeIOSInstallCombined: do not merge content of OUTPUT
 and ERROR variables

---
 Modules/CMakeIOSInstallCombined.cmake | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/Modules/CMakeIOSInstallCombined.cmake b/Modules/CMakeIOSInstallCombined.cmake
index e2a0fee..57a1fe0 100644
--- a/Modules/CMakeIOSInstallCombined.cmake
+++ b/Modules/CMakeIOSInstallCombined.cmake
@@ -237,17 +237,21 @@ function(ios_install_combined target destination)
   endif()
 
   set(cmd xcrun -f lipo)
+
+  # Do not merge OUTPUT_VARIABLE and ERROR_VARIABLE since latter may contain
+  # some diagnostic information even for the successful run.
   execute_process(
   COMMAND ${cmd}
   RESULT_VARIABLE result
   OUTPUT_VARIABLE output
-  ERROR_VARIABLE output
+  ERROR_VARIABLE error_output
   OUTPUT_STRIP_TRAILING_WHITESPACE
   ERROR_STRIP_TRAILING_WHITESPACE
   )
   if(NOT result EQUAL 0)
 message(
-FATAL_ERROR "Command failed (${result}): ${cmd}\n\nOutput:\n${output}"
+FATAL_ERROR "Command failed (${result}): ${cmd}\n\nOutput:\n${output}\nOutput(error):\n${error_output}"
 )
   endif()
   set(_lipo_path ${output})
-- 
2.7.4 (Apple Git-66)

-- 

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