summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-06-27 14:40:33 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-06-27 14:40:33 (GMT)
commit4adab7093a2a30caf053b149a3b57565235b05ca (patch)
tree7a0c4d9db4256d0175958bdda09627519e9b352f /Modules
parentfd36f4e024dbe45a7fb054bfcc62755d70f55414 (diff)
parent11c3a8dc11eae4305409afbb8d7fa66ee31d41de (diff)
downloadCMake-4adab7093a2a30caf053b149a3b57565235b05ca.zip
CMake-4adab7093a2a30caf053b149a3b57565235b05ca.tar.gz
CMake-4adab7093a2a30caf053b149a3b57565235b05ca.tar.bz2
Merge topic 'ios-universal-fixes'
11c3a8dc CMakeIOSInstallCombined: add some sanity checks aff1e77f CMakeIOSInstallCombined: do not merge content of OUTPUT and ERROR variables
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeIOSInstallCombined.cmake14
1 files changed, 12 insertions, 2 deletions
diff --git a/Modules/CMakeIOSInstallCombined.cmake b/Modules/CMakeIOSInstallCombined.cmake
index 1256f56..234322c 100644
--- a/Modules/CMakeIOSInstallCombined.cmake
+++ b/Modules/CMakeIOSInstallCombined.cmake
@@ -237,20 +237,30 @@ 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})
+ 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}")