Files
swift-mirror/stdlib/private/StdlibUnittestFoundationExtras/CMakeLists.txt
Eric Miotto 7239481fef CMake: add Observation dependency to libraries that import Foundation...
when building for Apple platforms.

In this scenario we are not building our own Foundation,
but we are importing the one from the underlying SDK -- this in turns
requires Observation, which is something we typically build.

Addresses rdar://162286123
2025-10-16 10:27:35 -07:00

33 lines
1.7 KiB
CMake

if(SWIFT_ENABLE_EXPERIMENTAL_OBSERVATION)
# This library imports Foundation from the SDK, which re-exports
# Observation which is part of this build.
list(APPEND swift_stdlib_unittest_foundationextras_darwin_dependencies Observation)
endif()
add_swift_target_library(swiftStdlibUnittestFoundationExtras ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
# This file should be listed the first. Module name is inferred from the
# filename.
StdlibUnittestFoundationExtras.swift
UnavailableFoundationMethodThunks.mm
SWIFT_MODULE_DEPENDS_IOS ${swift_stdlib_unittest_foundationextras_darwin_dependencies}
SWIFT_MODULE_DEPENDS_OSX ${swift_stdlib_unittest_foundationextras_darwin_dependencies}
SWIFT_MODULE_DEPENDS_TVOS ${swift_stdlib_unittest_foundationextras_darwin_dependencies}
SWIFT_MODULE_DEPENDS_WATCHOS ${swift_stdlib_unittest_foundationextras_darwin_dependencies}
SWIFT_MODULE_DEPENDS_XROS ${swift_stdlib_unittest_foundationextras_darwin_dependencies}
SWIFT_MODULE_DEPENDS_MACCATALYST ${swift_stdlib_unittest_foundationextras_darwin_dependencies}
SWIFT_MODULE_DEPENDS StdlibUnittest
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
INSTALL_IN_COMPONENT stdlib-experimental
DARWIN_INSTALL_NAME_DIR "${SWIFT_DARWIN_STDLIB_PRIVATE_INSTALL_NAME_DIR}"
DEPLOYMENT_VERSION_OSX ${SWIFT_DARWIN_TEST_DEPLOYMENT_VERSION_OSX}
DEPLOYMENT_VERSION_IOS ${SWIFT_DARWIN_TEST_DEPLOYMENT_VERSION_IOS}
DEPLOYMENT_VERSION_TVOS ${SWIFT_DARWIN_TEST_DEPLOYMENT_VERSION_TVOS}
DEPLOYMENT_VERSION_WATCHOS ${SWIFT_DARWIN_TEST_DEPLOYMENT_VERSION_WATCHOS}
DEPLOYMENT_VERSION_XROS ${SWIFT_DARWIN_TEST_DEPLOYMENT_VERSION_XROS}
MACCATALYST_BUILD_FLAVOR "zippered"
)