summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/XcodeProject
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/XcodeProject')
-rw-r--r--Tests/RunCMake/XcodeProject/DeploymentTarget.c26
-rw-r--r--Tests/RunCMake/XcodeProject/DeploymentTarget.cmake27
-rw-r--r--Tests/RunCMake/XcodeProject/EffectivePlatformNameOFF.cmake12
-rw-r--r--Tests/RunCMake/XcodeProject/RunCMakeTest.cmake307
-rw-r--r--Tests/RunCMake/XcodeProject/XCTestAddBundle.cmake22
-rw-r--r--Tests/RunCMake/XcodeProject/XCTestLookup.cmake3
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeBundles-install-check.cmake8
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeBundles.cmake143
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-cmakeinstall-check.cmake2
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-install-check.cmake37
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake40
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-check.cmake26
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-stdout.txt2
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake39
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-cmakeinstall-check.cmake2
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-install-check.cmake29
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake26
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeInstallIOS-install-stdout.txt2
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake7
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake13
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake7
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeTbdStub-stdout.txt1
-rw-r--r--Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake1
-rw-r--r--Tests/RunCMake/XcodeProject/main.m3
-rw-r--r--Tests/RunCMake/XcodeProject/osx.cmake18
25 files changed, 5 insertions, 798 deletions
diff --git a/Tests/RunCMake/XcodeProject/DeploymentTarget.c b/Tests/RunCMake/XcodeProject/DeploymentTarget.c
deleted file mode 100644
index 5e0f40f..0000000
--- a/Tests/RunCMake/XcodeProject/DeploymentTarget.c
+++ /dev/null
@@ -1,26 +0,0 @@
-#include <Availability.h>
-#include <TargetConditionals.h>
-
-#if TARGET_OS_OSX
-# if __MAC_OS_X_VERSION_MIN_REQUIRED != __MAC_10_11
-# error macOS deployment version mismatch
-# endif
-#elif TARGET_OS_IOS
-# if __IPHONE_OS_VERSION_MIN_REQUIRED != __IPHONE_9_1
-# error iOS deployment version mismatch
-# endif
-#elif TARGET_OS_WATCH
-# if __WATCH_OS_VERSION_MIN_REQUIRED != __WATCHOS_2_0
-# error watchOS deployment version mismatch
-# endif
-#elif TARGET_OS_TV
-# if __TV_OS_VERSION_MIN_REQUIRED != __TVOS_9_0
-# error tvOS deployment version mismatch
-# endif
-#else
-# error unknown OS
-#endif
-
-void foo()
-{
-}
diff --git a/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake b/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake
deleted file mode 100644
index 234ceef..0000000
--- a/Tests/RunCMake/XcodeProject/DeploymentTarget.cmake
+++ /dev/null
@@ -1,27 +0,0 @@
-enable_language(C)
-
-# using Xcode 7.1 SDK versions for deployment targets
-
-if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
- set(CMAKE_OSX_DEPLOYMENT_TARGET "9.1")
- set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO")
- set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
- set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")
-elseif(CMAKE_SYSTEM_NAME STREQUAL "watchOS")
- set(CMAKE_OSX_DEPLOYMENT_TARGET "2.0")
- set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO")
- set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
- set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
- set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "YES")
-elseif(CMAKE_SYSTEM_NAME STREQUAL "tvOS")
- set(CMAKE_OSX_DEPLOYMENT_TARGET "9.0")
- set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO")
- set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
- set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
- set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "YES")
-else()
- set(CMAKE_OSX_DEPLOYMENT_TARGET "10.11")
-endif()
-
-add_library(myFramework STATIC DeploymentTarget.c)
-set_target_properties(myFramework PROPERTIES FRAMEWORK TRUE)
diff --git a/Tests/RunCMake/XcodeProject/EffectivePlatformNameOFF.cmake b/Tests/RunCMake/XcodeProject/EffectivePlatformNameOFF.cmake
deleted file mode 100644
index 4a3bf56..0000000
--- a/Tests/RunCMake/XcodeProject/EffectivePlatformNameOFF.cmake
+++ /dev/null
@@ -1,12 +0,0 @@
-enable_language(CXX)
-
-set_property(GLOBAL PROPERTY XCODE_EMIT_EFFECTIVE_PLATFORM_NAME OFF)
-
-set(CMAKE_MACOSX_BUNDLE true)
-
-add_library(library STATIC foo.cpp)
-
-add_executable(main main.cpp)
-target_link_libraries(main library)
-
-install(TARGETS library ARCHIVE DESTINATION lib)
diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
index 61f7c40..c124950 100644
--- a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
+++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake
@@ -169,309 +169,4 @@ endfunction()
BundleLinkBundle()
-
-# Isolate device tests from host architecture selection.
-unset(ENV{CMAKE_OSX_ARCHITECTURES})
-
-# Use a single build tree for a few tests without cleaning.
-
-if(NOT XCODE_VERSION VERSION_LESS 5)
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeInstallIOS-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=iOS"
- "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_BINARY_DIR}/ios_install")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeInstallIOS)
- run_cmake_command(XcodeInstallIOS-install ${CMAKE_COMMAND} --build . --target install)
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesOSX-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=Darwin"
- "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeBundles)
- run_cmake_command(XcodeBundles-build-macOS ${CMAKE_COMMAND} --build .)
- run_cmake_command(XcodeBundles-install-macOS ${CMAKE_COMMAND} --build . --target install)
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesIOS-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=iOS"
- "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeBundles)
- run_cmake_command(XcodeBundles-build-iOS ${CMAKE_COMMAND} --build .)
- run_cmake_command(XcodeBundles-install-iOS ${CMAKE_COMMAND} --build . --target install)
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-endif()
-
-if(NOT XCODE_VERSION VERSION_LESS 7)
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesWatchOS-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=watchOS"
- "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeBundles)
- run_cmake_command(XcodeBundles-build-watchOS ${CMAKE_COMMAND} --build .)
- run_cmake_command(XcodeBundles-install-watchOS ${CMAKE_COMMAND} --build . --target install)
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-endif()
-
-if(NOT XCODE_VERSION VERSION_LESS 7.1)
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeBundlesTvOS-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=tvOS"
- "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeBundles)
- run_cmake_command(XcodeBundles-build-tvOS ${CMAKE_COMMAND} --build .)
- run_cmake_command(XcodeBundles-install-tvOS ${CMAKE_COMMAND} --build . --target install)
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-endif()
-
-if(NOT XCODE_VERSION VERSION_LESS 7)
- set(RunCMake_TEST_OPTIONS "-DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/osx.cmake")
- run_cmake(XcodeTbdStub)
- unset(RunCMake_TEST_OPTIONS)
-endif()
-
-if(XCODE_VERSION VERSION_GREATER_EQUAL 6)
- # XcodeIOSInstallCombined
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombined-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=iOS"
- "-DCMAKE_IOS_INSTALL_COMBINED=YES"
- "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeIOSInstallCombined)
- run_cmake_command(XcodeIOSInstallCombined-build ${CMAKE_COMMAND} --build .)
- if(XCODE_VERSION VERSION_LESS 12)
- run_cmake_command(XcodeIOSInstallCombined-install ${CMAKE_COMMAND} --build . --target install)
- endif()
- # --build defaults to Debug, --install defaults to Release, so we have to
- # specify the configuration explicitly
- run_cmake_command(XcodeIOSInstallCombined-cmakeinstall
- ${CMAKE_COMMAND} --install . --config Debug
- )
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-
- # XcodeIOSInstallCombinedPrune
- # FIXME(#24011): Xcode 14 removed support for older architectures the test needs.
- if(XCODE_VERSION VERSION_LESS 14)
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombinedPrune-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=iOS"
- "-DCMAKE_IOS_INSTALL_COMBINED=YES"
- "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeIOSInstallCombinedPrune)
- run_cmake_command(XcodeIOSInstallCombinedPrune-build ${CMAKE_COMMAND} --build .)
- if(XCODE_VERSION VERSION_LESS 12)
- run_cmake_command(XcodeIOSInstallCombinedPrune-install ${CMAKE_COMMAND} --build . --target install)
- endif()
- # --build defaults to Debug, --install defaults to Release, so we have to
- # specify the configuration explicitly
- run_cmake_command(XcodeIOSInstallCombinedPrune-cmakeinstall
- ${CMAKE_COMMAND} --install . --config Debug
- )
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
- endif()
-
- # XcodeIOSInstallCombinedSingleArch
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeIOSInstallCombinedSingleArch-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=iOS"
- "-DCMAKE_IOS_INSTALL_COMBINED=YES"
- "-DCMAKE_INSTALL_PREFIX:PATH=${RunCMake_TEST_BINARY_DIR}/_install")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeIOSInstallCombinedSingleArch)
- run_cmake_command(XcodeIOSInstallCombinedSingleArch-build ${CMAKE_COMMAND} --build .)
- if(XCODE_VERSION VERSION_LESS 12)
- run_cmake_command(XcodeIOSInstallCombinedSingleArch-install ${CMAKE_COMMAND} --build . --target install)
- endif()
- # --build defaults to Debug, --install defaults to Release, so we have to
- # specify the configuration explicitly
- run_cmake_command(XcodeIOSInstallCombinedSingleArch-cmakeinstall
- ${CMAKE_COMMAND} --install . --config Debug
- )
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-endif()
-
-if(NOT XCODE_VERSION VERSION_LESS 5)
- # XcodeMultiplatform
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeMultiplatform-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS "${IOS_DEPLOYMENT_TARGET}")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(XcodeMultiplatform)
-
- # build ios before macos
- run_cmake_command(XcodeMultiplatform-iphonesimulator-build ${CMAKE_COMMAND} --build . -- -sdk iphonesimulator)
- run_cmake_command(XcodeMultiplatform-iphonesimulator-install ${CMAKE_COMMAND} --build . --target install -- -sdk iphonesimulator DESTDIR=${RunCMake_TEST_BINARY_DIR}/_install_iphonesimulator)
-
- run_cmake_command(XcodeMultiplatform-macosx-build ${CMAKE_COMMAND} --build . -- -sdk macosx)
- run_cmake_command(XcodeMultiplatform-macosx-install ${CMAKE_COMMAND} --build . --target install -- -sdk macosx DESTDIR=${RunCMake_TEST_BINARY_DIR}/_install_macosx)
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-
- # EffectivePlatformNameOFF
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/EffectivePlatformNameOFF-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=iOS" "-DCMAKE_OSX_SYSROOT=iphonesimulator")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(EffectivePlatformNameOFF)
-
- run_cmake_command(EffectivePlatformNameOFF-iphonesimulator-build ${CMAKE_COMMAND} --build .)
- run_cmake_command(EffectivePlatformNameOFF-iphonesimulator-install ${CMAKE_COMMAND} --build . --target install -- DESTDIR=${RunCMake_TEST_BINARY_DIR}/_install_iphonesimulator)
-
- unset(RunCMake_TEST_BINARY_DIR)
- unset(RunCMake_TEST_NO_CLEAN)
- unset(RunCMake_TEST_OPTIONS)
-endif()
-
-if(XCODE_VERSION VERSION_GREATER_EQUAL 8)
- function(deployment_target_test SystemName SDK)
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/DeploymentTarget-${SDK}-build)
- set(RunCMake_TEST_NO_CLEAN 1)
- set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=${SystemName}" "-DCMAKE_OSX_SYSROOT=${SDK}")
-
- file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
- file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}")
-
- run_cmake(DeploymentTarget)
- run_cmake_command(DeploymentTarget-${SDK} ${CMAKE_COMMAND} --build .)
- endfunction()
-
- deployment_target_test(Darwin macosx)
- deployment_target_test(iOS iphoneos)
- deployment_target_test(iOS iphonesimulator)
- deployment_target_test(tvOS appletvos)
- deployment_target_test(tvOS appletvsimulator)
- deployment_target_test(watchOS watchos)
- deployment_target_test(watchOS watchsimulator)
-endif()
-
-if(XCODE_VERSION VERSION_GREATER_EQUAL 8)
- function(xctest_lookup_test SystemName SDK)
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XCTestLookup-${SDK}-build)
- set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=${SystemName}" "-DCMAKE_OSX_SYSROOT=${SDK}")
-
- run_cmake(XCTestLookup)
- endfunction()
-
- xctest_lookup_test(Darwin macosx)
- xctest_lookup_test(iOS iphoneos)
- xctest_lookup_test(iOS iphonesimulator)
- xctest_lookup_test(tvOS appletvos)
- xctest_lookup_test(tvOS appletvsimulator)
-endif()
-
-if(XCODE_VERSION VERSION_GREATER_EQUAL 8)
- function(XcodeRemoveExcessiveISystemSDK SDK)
- set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/XcodeRemoveExcessiveISystemSDK-${SDK}-build)
- set(RunCMake_TEST_OPTIONS "-DCMAKE_SYSTEM_NAME=iOS" "-DCMAKE_OSX_SYSROOT=${SDK}")
- run_cmake(XcodeRemoveExcessiveISystem)
- set(RunCMake_TEST_NO_CLEAN 1)
- run_cmake_command(XcodeRemoveExcessiveISystemSDK-${SDK}-build ${CMAKE_COMMAND} --build .)
- endfunction()
-
- XcodeRemoveExcessiveISystemSDK(iphoneos)
- XcodeRemoveExcessiveISystemSDK(iphonesimulator)
-endif()
-
-if (XCODE_VERSION VERSION_GREATER_EQUAL 7.3)
- function(xctest_add_bundle_test SystemName SDK BuildSystemVersion ExpectedOutputDir)
- set(RunCMake_TEST_BINARY_DIR
- ${RunCMake_BINARY_DIR}/DeploymentTarget-${SystemName}-${SDK}-${BuildSystemVersion}-build)
- set(RunCMake_TEST_OPTIONS
- "-DCMAKE_SYSTEM_NAME=${SystemName}"
- "-DCMAKE_OSX_SYSROOT=${SDK}"
- "-DTEST_EXPECTED_OUTPUT_DIR=${ExpectedOutputDir}")
- unset(RunCMake_GENERATOR_TOOLSET)
- if(BuildSystemVersion)
- set(RunCMake_GENERATOR_TOOLSET "buildsystem=${BuildSystemVersion}")
- endif()
- run_cmake(XCTestAddBundle)
- endfunction()
-
- if(XCODE_VERSION VERSION_GREATER_EQUAL 12)
- xctest_add_bundle_test(Darwin macosx "1" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
- xctest_add_bundle_test(Darwin macosx "12" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
- xctest_add_bundle_test(iOS iphonesimulator "1" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
- if (XCODE_VERSION VERSION_LESS 12.5)
- xctest_add_bundle_test(iOS iphonesimulator "12" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>")
- else()
- xctest_add_bundle_test(iOS iphonesimulator "12" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
- endif()
- else()
- xctest_add_bundle_test(Darwin macosx "" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
- xctest_add_bundle_test(iOS iphonesimulator "" "$<TARGET_BUNDLE_CONTENT_DIR:TestedApp>/PlugIns")
- endif()
-endif()
-
-# Please add macOS-only tests above before the device-specific tests.
+# Please add device-specific tests to '../XcodeProject-Device/RunCMakeTest.cmake'.
diff --git a/Tests/RunCMake/XcodeProject/XCTestAddBundle.cmake b/Tests/RunCMake/XcodeProject/XCTestAddBundle.cmake
deleted file mode 100644
index 9114fee..0000000
--- a/Tests/RunCMake/XcodeProject/XCTestAddBundle.cmake
+++ /dev/null
@@ -1,22 +0,0 @@
-enable_language(Swift)
-
-set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED NO)
-set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
-set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
-
-find_package(XCTest REQUIRED)
-
-add_executable(TestedApp MACOSX_BUNDLE dummy_main.swift)
-
-xctest_add_bundle(TestingAppBundle TestedApp dummy_main.swift)
-
-get_target_property(_lib_output_dir TestingAppBundle LIBRARY_OUTPUT_DIRECTORY)
-
-if (NOT DEFINED TEST_EXPECTED_OUTPUT_DIR)
- message(FATAL_ERROR "Testing variable TEST_EXPECTED_OUTPUT_DIR is not set")
-endif()
-
-if (NOT _lib_output_dir STREQUAL TEST_EXPECTED_OUTPUT_DIR)
- message(SEND_ERROR "Property LIBRARY_OUTPUT_DIRECTORY is expected to be ${TEST_EXPECTED_OUTPUT_DIR} "
- "but was ${_lib_output_dir}")
-endif()
diff --git a/Tests/RunCMake/XcodeProject/XCTestLookup.cmake b/Tests/RunCMake/XcodeProject/XCTestLookup.cmake
deleted file mode 100644
index 77676e5..0000000
--- a/Tests/RunCMake/XcodeProject/XCTestLookup.cmake
+++ /dev/null
@@ -1,3 +0,0 @@
-enable_language(C)
-
-find_package(XCTest REQUIRED)
diff --git a/Tests/RunCMake/XcodeProject/XcodeBundles-install-check.cmake b/Tests/RunCMake/XcodeProject/XcodeBundles-install-check.cmake
deleted file mode 100644
index 758d730..0000000
--- a/Tests/RunCMake/XcodeProject/XcodeBundles-install-check.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-file(GLOB DIRECTORIES LIST_DIRECTORIES true
- "${RunCMake_TEST_BINARY_DIR}/_install/FooExtension/*.*")
-
-foreach(DIRECTORY IN LISTS DIRECTORIES)
- if(NOT DIRECTORY MATCHES "\\.foo$")
- message(SEND_ERROR "Extension does not match ${DIRECTORY}")
- endif()
-endforeach()
diff --git a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake b/Tests/RunCMake/XcodeProject/XcodeBundles.cmake
deleted file mode 100644
index a9fafd2..0000000
--- a/Tests/RunCMake/XcodeProject/XcodeBundles.cmake
+++ /dev/null
@@ -1,143 +0,0 @@
-# check if Xcode and CMake have the same understanding of Bundle layout
-
-enable_language(C)
-
-if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
- set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO")
- set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
- set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
- set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")
-endif()
-
-if(CMAKE_SYSTEM_NAME STREQUAL "tvOS" OR CMAKE_SYSTEM_NAME STREQUAL "watchOS")
- set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO")
- set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
- set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
- set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "YES")
-endif()
-
-# App Bundle
-
-add_executable(AppBundle MACOSX_BUNDLE main.m)
-
-add_custom_target(AppBundleTest ALL
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_FILE:AppBundle>" "$<TARGET_FILE:AppBundle>.old")
-
-add_dependencies(AppBundleTest AppBundle)
-
-# with custom extension
-
-if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
- add_executable(AppBundleExt MACOSX_BUNDLE main.m)
- set_target_properties(AppBundleExt PROPERTIES BUNDLE_EXTENSION "foo")
- install(TARGETS AppBundleExt BUNDLE DESTINATION FooExtension)
-
- add_custom_target(AppBundleExtTest ALL
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_FILE:AppBundleExt>" "$<TARGET_FILE:AppBundleExt>.old")
-
- add_dependencies(AppBundleExtTest AppBundleExt)
-endif()
-
-# Shared Framework (not supported for iOS on Xcode < 6)
-
-if(NOT CMAKE_SYSTEM_NAME STREQUAL "iOS" OR NOT XCODE_VERSION VERSION_LESS 6)
- add_library(SharedFramework SHARED main.c)
- set_target_properties(SharedFramework PROPERTIES FRAMEWORK TRUE)
-
- add_custom_target(SharedFrameworkTest ALL
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_BUNDLE_DIR:SharedFramework>" "$<TARGET_BUNDLE_DIR:SharedFramework>.old"
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_BUNDLE_CONTENT_DIR:SharedFramework>" "$<TARGET_BUNDLE_CONTENT_DIR:SharedFramework>.old"
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_FILE:SharedFramework>" "$<TARGET_FILE:SharedFramework>.old")
-
- add_dependencies(SharedFrameworkTest SharedFramework)
-
- # with custom extension
-
- add_library(SharedFrameworkExt SHARED main.c)
- set_target_properties(SharedFrameworkExt PROPERTIES FRAMEWORK TRUE)
- set_target_properties(SharedFrameworkExt PROPERTIES BUNDLE_EXTENSION "foo")
- install(TARGETS SharedFrameworkExt FRAMEWORK DESTINATION FooExtension)
-
- add_custom_target(SharedFrameworkExtTest ALL
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_BUNDLE_DIR:SharedFrameworkExt>" "$<TARGET_BUNDLE_DIR:SharedFrameworkExt>.old"
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_BUNDLE_CONTENT_DIR:SharedFrameworkExt>" "$<TARGET_BUNDLE_CONTENT_DIR:SharedFrameworkExt>.old"
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_FILE:SharedFrameworkExt>" "$<TARGET_FILE:SharedFrameworkExt>.old")
-
- add_dependencies(SharedFrameworkExtTest SharedFrameworkExt)
-endif()
-
-# Static Framework (not supported for Xcode < 6)
-
-if(NOT XCODE_VERSION VERSION_LESS 6)
- add_library(StaticFramework STATIC main.c)
- set_target_properties(StaticFramework PROPERTIES FRAMEWORK TRUE)
-
- add_custom_target(StaticFrameworkTest ALL
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_BUNDLE_DIR:StaticFramework>" "$<TARGET_BUNDLE_DIR:StaticFramework>.old"
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_BUNDLE_CONTENT_DIR:StaticFramework>" "$<TARGET_BUNDLE_CONTENT_DIR:StaticFramework>.old"
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_FILE:StaticFramework>" "$<TARGET_FILE:StaticFramework>.old")
-
- add_dependencies(StaticFrameworkTest StaticFramework)
-
- # with custom extension
-
- add_library(StaticFrameworkExt STATIC main.c)
- set_target_properties(StaticFrameworkExt PROPERTIES FRAMEWORK TRUE)
- set_target_properties(StaticFrameworkExt PROPERTIES BUNDLE_EXTENSION "foo")
- install(TARGETS StaticFrameworkExt FRAMEWORK DESTINATION StaticFooExtension)
-
- add_custom_target(StaticFrameworkExtTest ALL
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_BUNDLE_DIR:StaticFrameworkExt>" "$<TARGET_BUNDLE_DIR:StaticFrameworkExt>.old"
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_BUNDLE_CONTENT_DIR:StaticFrameworkExt>" "$<TARGET_BUNDLE_CONTENT_DIR:StaticFrameworkExt>.old"
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_FILE:StaticFrameworkExt>" "$<TARGET_FILE:StaticFrameworkExt>.old")
-
- add_dependencies(StaticFrameworkExtTest StaticFrameworkExt)
-endif()
-
-# Bundle
-
-if(NOT CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE)
- add_library(Bundle MODULE main.c)
- set_target_properties(Bundle PROPERTIES BUNDLE TRUE)
-
- add_custom_target(BundleTest ALL
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_BUNDLE_DIR:Bundle>" "$<TARGET_BUNDLE_DIR:Bundle>.old"
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_BUNDLE_CONTENT_DIR:Bundle>" "$<TARGET_BUNDLE_CONTENT_DIR:Bundle>.old"
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_FILE:Bundle>" "$<TARGET_FILE:Bundle>.old")
-
- add_dependencies(BundleTest Bundle)
-
- # with custom extension
-
- add_library(BundleExt MODULE main.c)
- set_target_properties(BundleExt PROPERTIES BUNDLE TRUE)
- set_target_properties(BundleExt PROPERTIES BUNDLE_EXTENSION "foo")
- install(TARGETS BundleExt LIBRARY DESTINATION FooExtension)
-
- add_custom_target(BundleExtTest ALL
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_BUNDLE_DIR:BundleExt>" "$<TARGET_BUNDLE_DIR:BundleExt>.old"
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_BUNDLE_CONTENT_DIR:BundleExt>" "$<TARGET_BUNDLE_CONTENT_DIR:BundleExt>.old"
- COMMAND ${CMAKE_COMMAND} -E copy
- "$<TARGET_FILE:BundleExt>" "$<TARGET_FILE:BundleExt>.old")
-
- add_dependencies(BundleExtTest BundleExt)
-endif()
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-cmakeinstall-check.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-cmakeinstall-check.cmake
deleted file mode 100644
index a1ceb13..0000000
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-cmakeinstall-check.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-# Expect the same results whether installing directly or via cmake --install
-include(${CMAKE_CURRENT_LIST_DIR}/XcodeIOSInstallCombined-install-check.cmake)
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-install-check.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-install-check.cmake
deleted file mode 100644
index 60bc0d8..0000000
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined-install-check.cmake
+++ /dev/null
@@ -1,37 +0,0 @@
-function(verify_architectures file)
- execute_process(
- COMMAND xcrun otool -vf ${RunCMake_TEST_BINARY_DIR}/_install/${file}
- OUTPUT_VARIABLE otool_out
- ERROR_VARIABLE otool_err
- RESULT_VARIABLE otool_result)
- if(NOT otool_result EQUAL "0")
- message(SEND_ERROR "Could not retrieve fat headers: ${otool_err}")
- return()
- endif()
-
- string(REGEX MATCHALL "\narchitecture [^ \n\t()]+" architectures "${otool_out}")
- string(REPLACE "\narchitecture " "" actual "${architectures}")
- list(SORT actual)
-
- if(XCODE_VERSION VERSION_LESS 14)
- set(maybe_armv7 armv7)
- set(maybe_i386 i386)
- else()
- set(maybe_armv7 "")
- set(maybe_i386 "")
- endif()
- set(expected arm64 ${maybe_armv7} ${maybe_i386} x86_64)
-
- if(NOT actual STREQUAL expected)
- message(SEND_ERROR
- "The actual library contains the architectures:\n ${actual} \n"
- "which do not match expected ones:\n ${expected} \n"
- "otool output:\n${otool_out}")
- endif()
-endfunction()
-
-verify_architectures(bin/foo_app.app/foo_app)
-verify_architectures(lib/libfoo_static.a)
-verify_architectures(lib/libfoo_shared.dylib)
-verify_architectures(lib/foo_bundle.bundle/foo_bundle)
-verify_architectures(lib/foo_framework.framework/foo_framework)
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake
deleted file mode 100644
index f8eccc7..0000000
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombined.cmake
+++ /dev/null
@@ -1,40 +0,0 @@
-enable_language(CXX)
-
-set(maybe_armv7 armv7)
-set(maybe_i386 i386)
-if(XCODE_VERSION VERSION_GREATER_EQUAL 14)
- set(CMAKE_OSX_DEPLOYMENT_TARGET 16)
- set(maybe_armv7 "")
- set(maybe_i386 "")
-elseif(XCODE_VERSION VERSION_GREATER_EQUAL 9)
- set(CMAKE_OSX_DEPLOYMENT_TARGET 10)
-endif()
-
-if(NOT IOS)
- message(FATAL_ERROR "IOS variable is not set")
-endif()
-
-set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO")
-set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
-set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
-set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf")
-set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")
-
-set(CMAKE_OSX_ARCHITECTURES ${maybe_armv7} arm64 ${maybe_i386} x86_64)
-
-add_executable(foo_app MACOSX_BUNDLE main.cpp)
-install(TARGETS foo_app BUNDLE DESTINATION bin)
-
-add_library(foo_static STATIC foo.cpp)
-install(TARGETS foo_static ARCHIVE DESTINATION lib)
-
-add_library(foo_shared SHARED foo.cpp)
-install(TARGETS foo_shared LIBRARY DESTINATION lib)
-
-add_library(foo_bundle MODULE foo.cpp)
-set_target_properties(foo_bundle PROPERTIES BUNDLE TRUE)
-install(TARGETS foo_bundle LIBRARY DESTINATION lib)
-
-add_library(foo_framework SHARED foo.cpp)
-set_target_properties(foo_framework PROPERTIES FRAMEWORK TRUE)
-install(TARGETS foo_framework FRAMEWORK DESTINATION lib)
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-check.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-check.cmake
deleted file mode 100644
index 37bb4d5..0000000
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-check.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-function(verify_architectures file)
- execute_process(
- COMMAND xcrun otool -vf ${RunCMake_TEST_BINARY_DIR}/_install/${file}
- OUTPUT_VARIABLE otool_out
- ERROR_VARIABLE otool_err
- RESULT_VARIABLE otool_result)
- if(NOT otool_result EQUAL "0")
- message(SEND_ERROR "Could not retrieve fat headers: ${otool_err}")
- return()
- endif()
-
- string(REGEX MATCHALL "\narchitecture [^ \n\t()]+" architectures ${otool_out})
- string(REPLACE "\narchitecture " "" actual "${architectures}")
- list(SORT actual)
-
- set(expected armv7 x86_64)
-
- if(NOT actual STREQUAL expected)
- message(SEND_ERROR
- "The actual library contains the architectures:\n ${actual} \n"
- "which do not match expected ones:\n ${expected} \n"
- "otool output:\n${otool_out}")
- endif()
-endfunction()
-
-verify_architectures(lib/libfoo.dylib)
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-stdout.txt b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-stdout.txt
deleted file mode 100644
index 28edadc..0000000
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune-install-stdout.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-.*Unexpected architecture `i386` detected.*
-.*Unexpected architecture `arm64` detected.* \ No newline at end of file
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake
deleted file mode 100644
index e719428..0000000
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedPrune.cmake
+++ /dev/null
@@ -1,39 +0,0 @@
-enable_language(CXX)
-
-if(XCODE_VERSION VERSION_GREATER_EQUAL 9)
- set(CMAKE_OSX_DEPLOYMENT_TARGET 10)
-endif()
-
-set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO")
-set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
-set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
-set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf")
-
-add_library(foo SHARED foo.cpp)
-install(TARGETS foo DESTINATION lib)
-
-add_library(baz SHARED foo.cpp)
-set_target_properties(
- foo baz
- PROPERTIES
- XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] armv7
- XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] armv7
- XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] x86_64
- XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] x86_64
-)
-
-add_library(boo SHARED foo.cpp)
-set_target_properties(
- boo
- PROPERTIES
- XCODE_ATTRIBUTE_ARCHS[sdk=iphoneos*] arm64
- XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] arm64
- XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] i386
- XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] i386
-)
-
-add_custom_command(
- TARGET foo
- POST_BUILD
- COMMAND lipo -create $<TARGET_FILE:baz> $<TARGET_FILE:boo> -output $<TARGET_FILE:foo>
-)
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-cmakeinstall-check.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-cmakeinstall-check.cmake
deleted file mode 100644
index 3f7c379..0000000
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-cmakeinstall-check.cmake
+++ /dev/null
@@ -1,2 +0,0 @@
-# Expect the same results whether installing directly or via cmake --install
-include(${CMAKE_CURRENT_LIST_DIR}/XcodeIOSInstallCombinedSingleArch-install-check.cmake)
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-install-check.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-install-check.cmake
deleted file mode 100644
index db8f869..0000000
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch-install-check.cmake
+++ /dev/null
@@ -1,29 +0,0 @@
-function(verify_architecture file)
- execute_process(
- COMMAND xcrun lipo -info ${RunCMake_TEST_BINARY_DIR}/_install/${file}
- OUTPUT_VARIABLE lipo_out
- ERROR_VARIABLE lipo_err
- RESULT_VARIABLE lipo_result)
- if(NOT lipo_result EQUAL "0")
- message(SEND_ERROR "lipo -info failed: ${lipo_err}")
- return()
- endif()
-
- string(REGEX MATCHALL "is architecture: [^ \n\t]+" architecture "${lipo_out}")
- string(REGEX REPLACE "is architecture: " "" actual "${architecture}")
-
- if(XCODE_VERSION VERSION_GREATER_EQUAL 14)
- set(expected arm64)
- else()
- set(expected armv7)
- endif()
-
- if(NOT actual STREQUAL expected)
- message(SEND_ERROR
- "The actual library architecture:\n ${actual} \n"
- "which do not match expected ones:\n ${expected} \n"
- "lipo output:\n${lipo_out}")
- endif()
-endfunction()
-
-verify_architecture(lib/libfoo.dylib)
diff --git a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake b/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake
deleted file mode 100644
index cb22e51..0000000
--- a/Tests/RunCMake/XcodeProject/XcodeIOSInstallCombinedSingleArch.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-enable_language(CXX)
-
-set(iphoneos_arch armv7)
-if(XCODE_VERSION VERSION_GREATER_EQUAL 14)
- set(CMAKE_OSX_DEPLOYMENT_TARGET 16)
- set(iphoneos_arch arm64)
-elseif(XCODE_VERSION VERSION_GREATER_EQUAL 9)
- set(CMAKE_OSX_DEPLOYMENT_TARGET 10)
-endif()
-
-set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "NO")
-set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
-set(CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "")
-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*] ${iphoneos_arch}
- XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphoneos*] ${iphoneos_arch}
- XCODE_ATTRIBUTE_ARCHS[sdk=iphonesimulator*] ""
- XCODE_ATTRIBUTE_VALID_ARCHS[sdk=iphonesimulator*] ""
-)
diff --git a/Tests/RunCMake/XcodeProject/XcodeInstallIOS-install-stdout.txt b/Tests/RunCMake/XcodeProject/XcodeInstallIOS-install-stdout.txt
deleted file mode 100644
index f2478be..0000000
--- a/Tests/RunCMake/XcodeProject/XcodeInstallIOS-install-stdout.txt
+++ /dev/null
@@ -1,2 +0,0 @@
--- Install configuration: .*
--- Installing: .*/ios_install/lib/libfoo.a
diff --git a/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake b/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake
deleted file mode 100644
index fccd4c6..0000000
--- a/Tests/RunCMake/XcodeProject/XcodeInstallIOS.cmake
+++ /dev/null
@@ -1,7 +0,0 @@
-enable_language(CXX)
-
-set(XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "NO")
-set(CMAKE_XCODE_ATTRIBUTE_ENABLE_BITCODE "NO")
-
-add_library(foo STATIC foo.cpp)
-install(TARGETS foo ARCHIVE DESTINATION lib)
diff --git a/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake b/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake
deleted file mode 100644
index b334b7d..0000000
--- a/Tests/RunCMake/XcodeProject/XcodeMultiplatform.cmake
+++ /dev/null
@@ -1,13 +0,0 @@
-enable_language(CXX)
-
-set_property(GLOBAL PROPERTY XCODE_EMIT_EFFECTIVE_PLATFORM_NAME ON)
-
-set(CMAKE_XCODE_ATTRIBUTE_SUPPORTED_PLATFORMS "macosx iphonesimulator")
-set(CMAKE_MACOSX_BUNDLE true)
-
-add_library(library STATIC foo.cpp)
-
-add_executable(main main.cpp)
-target_link_libraries(main library)
-
-install(TARGETS library ARCHIVE DESTINATION lib)
diff --git a/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake b/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake
index 80107cb..6b09b51 100644
--- a/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake
+++ b/Tests/RunCMake/XcodeProject/XcodeRemoveExcessiveISystem.cmake
@@ -1,3 +1,4 @@
+# This file is also included from '../XcodeProject-Device/XcodeRemoveExcessiveISystem.cmake'.
if(NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" MATCHES "[;$]")
set(USE_SWIFT 1)
@@ -33,12 +34,12 @@ list(REMOVE_ITEM CMAKE_SYSTEM_PREFIX_PATH /usr/local /usr / /usr/X11R6 /usr/pkg
find_package(ZLIB REQUIRED)
add_library (framework_dependency STATIC)
-target_sources (framework_dependency PRIVATE use_cmath.cpp)
+target_sources (framework_dependency PRIVATE ${CMAKE_CURRENT_LIST_DIR}/use_cmath.cpp)
target_link_libraries(framework_dependency INTERFACE ZLIB::ZLIB)
-add_library (framework_test SHARED use_cmath.cpp)
+add_library (framework_test SHARED ${CMAKE_CURRENT_LIST_DIR}/use_cmath.cpp)
if(USE_SWIFT)
- target_sources(framework_test PRIVATE foo.swift)
+ target_sources(framework_test PRIVATE ${CMAKE_CURRENT_LIST_DIR}/foo.swift)
endif()
target_link_libraries (framework_test PRIVATE framework_dependency)
diff --git a/Tests/RunCMake/XcodeProject/XcodeTbdStub-stdout.txt b/Tests/RunCMake/XcodeProject/XcodeTbdStub-stdout.txt
deleted file mode 100644
index 9d9e143..0000000
--- a/Tests/RunCMake/XcodeProject/XcodeTbdStub-stdout.txt
+++ /dev/null
@@ -1 +0,0 @@
-.*/libz\.tbd.*
diff --git a/Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake b/Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake
deleted file mode 100644
index 55dd1a7..0000000
--- a/Tests/RunCMake/XcodeProject/XcodeTbdStub.cmake
+++ /dev/null
@@ -1 +0,0 @@
-find_package(ZLIB REQUIRED)
diff --git a/Tests/RunCMake/XcodeProject/main.m b/Tests/RunCMake/XcodeProject/main.m
deleted file mode 100644
index 3e70e50..0000000
--- a/Tests/RunCMake/XcodeProject/main.m
+++ /dev/null
@@ -1,3 +0,0 @@
-int main(void) {
- return 1;
-}
diff --git a/Tests/RunCMake/XcodeProject/osx.cmake b/Tests/RunCMake/XcodeProject/osx.cmake
deleted file mode 100644
index e021fcd..0000000
--- a/Tests/RunCMake/XcodeProject/osx.cmake
+++ /dev/null
@@ -1,18 +0,0 @@
-set(CMAKE_SYSTEM_NAME Darwin)
-set(CMAKE_SYSTEM_VERSION 1)
-set(UNIX True)
-set(APPLE True)
-
-find_program(XCRUN_EXECUTABLE xcrun)
-if(NOT XCRUN_EXECUTABLE)
- message(FATAL_ERROR "xcrun not found")
-endif()
-
-execute_process(
- COMMAND ${XCRUN_EXECUTABLE} --sdk macosx --show-sdk-path
- OUTPUT_VARIABLE OSX_SDK_PATH
- OUTPUT_STRIP_TRAILING_WHITESPACE)
-
-set(CMAKE_OSX_SYSROOT ${OSX_SDK_PATH} CACHE PATH "Sysroot used for OSX support")
-
-set(CMAKE_FIND_ROOT_PATH ${OSX_SDK_PATH} CACHE PATH "Find search path root")