diff options
author | Ruslan Baratov <ruslan_baratov@yahoo.com> | 2016-03-14 10:27:53 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-03-15 14:09:50 (GMT) |
commit | e3fc2899c89fb075a695d6140eaadf11db85d96c (patch) | |
tree | 666271bba05c80f525df422bcf63ef7394bb273d /Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake | |
parent | b369959eb55dbea601315530185cb480c922cc77 (diff) | |
download | CMake-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 'Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake')
-rw-r--r-- | Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake new file mode 100644 index 0000000..4b5e7ce --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake @@ -0,0 +1,19 @@ +cmake_minimum_required(VERSION 3.3) + +project(XcodeIOSInstallCombinedSingleArch CXX) + +set(CMAKE_OSX_SYSROOT iphoneos) +set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO") +set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf") + +add_library(foo SHARED foo.cpp) +install(TARGETS foo DESTINATION lib) + +set_target_properties( + foo + PROPERTIES + XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] armv7 + XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] armv7 + XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] "" + XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] "" +) |