mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
BlocksRuntimeStubs is built for the target SDK(s), but it was using one of the stdlib CMake helpers without setting up the same environment as the stdlib/ folder is setting. To avoid problems, like BlocksRuntimeStubs being built with the host compiler, instead of the just built compiler, and other difficult to understand problems, create a folder for it in stdlib/private/. This will allow the usage of the stdlib CMake function in the same environment that is normally used.
47 lines
1.6 KiB
CMake
47 lines
1.6 KiB
CMake
if(SWIFT_BUILD_STDLIB OR SWIFT_BUILD_SDK_OVERLAY)
|
|
add_subdirectory(SwiftPrivate)
|
|
endif()
|
|
|
|
if(SWIFT_BUILD_SDK_OVERLAY)
|
|
# SwiftPrivateThreadExtras makes use of Darwin/Glibc, which is part of the
|
|
# SDK overlay. It can't be built separately from the SDK overlay.
|
|
if(SWIFT_ENABLE_EXPERIMENTAL_DIFFERENTIABLE_PROGRAMMING)
|
|
add_subdirectory(DifferentiationUnittest)
|
|
endif()
|
|
endif()
|
|
|
|
if(SWIFT_BUILD_SDK_OVERLAY OR SWIFT_BUILD_TEST_SUPPORT_MODULES)
|
|
add_subdirectory(RuntimeUnittest)
|
|
add_subdirectory(StdlibUnicodeUnittest)
|
|
add_subdirectory(StdlibCollectionUnittest)
|
|
add_subdirectory(SwiftPrivateLibcExtras)
|
|
add_subdirectory(SwiftPrivateThreadExtras)
|
|
|
|
# NOTE(compnerd) this must come after SwiftPrivateLibcExtras and
|
|
# SwiftPrivateThreadExtras to ensure that the dependency targets are setup in
|
|
# the correct order for Windows.
|
|
add_subdirectory(StdlibUnittest)
|
|
endif()
|
|
|
|
if(SWIFT_BUILD_SDK_OVERLAY)
|
|
add_subdirectory(OSLog)
|
|
|
|
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
|
add_subdirectory(StdlibUnittestFoundationExtras)
|
|
endif()
|
|
# Currently SwiftReflectionTest cannot be built on Windows, due to
|
|
# dependencies on POSIX symbols
|
|
if (SWIFT_INCLUDE_TESTS AND (NOT CMAKE_SYSTEM_NAME STREQUAL "Windows"))
|
|
add_subdirectory(SwiftReflectionTest)
|
|
endif()
|
|
endif()
|
|
|
|
# Keep in sync with stdlib/tools/CMakeLists.txt: swift-reflection-test is
|
|
# only used when testing dynamic stdlib.
|
|
if(SWIFT_BUILD_DYNAMIC_STDLIB AND SWIFT_INCLUDE_TESTS)
|
|
# NOTE create a stub BlocksRuntime library that can be used for the
|
|
# reflection tests
|
|
add_subdirectory(BlocksRuntimeStubs)
|
|
endif()
|
|
|