summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRuslan Baratov <ruslan_baratov@yahoo.com>2016-03-14 10:27:53 (GMT)
committerBrad King <brad.king@kitware.com>2016-03-15 14:09:50 (GMT)
commite3fc2899c89fb075a695d6140eaadf11db85d96c (patch)
tree666271bba05c80f525df422bcf63ef7394bb273d /Modules
parentb369959eb55dbea601315530185cb480c922cc77 (diff)
downloadCMake-e3fc2899c89fb075a695d6140eaadf11db85d96c.zip
CMake-e3fc2899c89fb075a695d6140eaadf11db85d96c.tar.gz
CMake-e3fc2899c89fb075a695d6140eaadf11db85d96c.tar.bz2
Fix iOS combined feature for single architecture targets
If list of valid target architectures is empty for given SDK then there will be no VALID_ARCHS build setting returned by Xcode. Return "" (empty string) explicitly in this case. This may happens if CMAKE_IOS_INSTALL_COMBINED is ON but only one architecture used in target.
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeIOSInstallCombined.cmake12
1 files changed, 11 insertions, 1 deletions
diff --git a/Modules/CMakeIOSInstallCombined.cmake b/Modules/CMakeIOSInstallCombined.cmake
index f052a3b..1256f56 100644
--- a/Modules/CMakeIOSInstallCombined.cmake
+++ b/Modules/CMakeIOSInstallCombined.cmake
@@ -52,7 +52,14 @@ function(_ios_install_combined_get_build_setting sdk variable resultvar)
endif()
if(NOT output MATCHES " ${variable} = ([^\n]*)")
- message(FATAL_ERROR "${variable} not found.")
+ if("${variable}" STREQUAL "VALID_ARCHS")
+ # VALID_ARCHS may be unset by user for given SDK
+ # (e.g. for build without simulator).
+ set("${resultvar}" "" PARENT_SCOPE)
+ return()
+ else()
+ message(FATAL_ERROR "${variable} not found.")
+ endif()
endif()
set("${resultvar}" "${CMAKE_MATCH_1}" PARENT_SCOPE)
@@ -72,6 +79,9 @@ function(_ios_install_combined_get_valid_archs sdk resultvar)
list(REMOVE_ITEM valid_archs "") # remove empty elements
list(REMOVE_DUPLICATES valid_archs)
+ string(REPLACE ";" " " printable "${valid_archs}")
+ _ios_install_combined_message("Architectures (${sdk}): ${printable}")
+
set("${resultvar}" "${valid_archs}" PARENT_SCOPE)
endfunction()