CMakeIOSInstallCombined: do not merge content of OUTPUT and ERROR variables

This commit is contained in:
Ruslan Baratov 2016-06-25 13:37:44 +02:00 committed by Gregor Jasny
parent 3a0449439f
commit aff1e77f48
1 changed files with 5 additions and 2 deletions

View File

@ -237,17 +237,20 @@ 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})