Commit 4adab709 authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'ios-universal-fixes'

11c3a8dc CMakeIOSInstallCombined: add some sanity checks
aff1e77f CMakeIOSInstallCombined: do not merge content of OUTPUT and ERROR variables
parents fd36f4e0 11c3a8dc
...@@ -237,20 +237,30 @@ function(ios_install_combined target destination) ...@@ -237,20 +237,30 @@ function(ios_install_combined target destination)
endif() endif()
set(cmd xcrun -f lipo) 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( execute_process(
COMMAND ${cmd} COMMAND ${cmd}
RESULT_VARIABLE result RESULT_VARIABLE result
OUTPUT_VARIABLE output OUTPUT_VARIABLE output
ERROR_VARIABLE output ERROR_VARIABLE error_output
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_STRIP_TRAILING_WHITESPACE
ERROR_STRIP_TRAILING_WHITESPACE ERROR_STRIP_TRAILING_WHITESPACE
) )
if(NOT result EQUAL 0) if(NOT result EQUAL 0)
message( 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() endif()
set(_lipo_path ${output}) 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_CONFIG "${CMAKE_INSTALL_CONFIG_NAME}")
set(CURRENT_TARGET "${target}") set(CURRENT_TARGET "${target}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment