mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
We need to actually keep the XCTest support in an overlay for now. This reverts commit 4a2726862634a553483943baf39a251ac8071e37. Addresses <rdar://problem/17423669>. Swift SVN r19101
47 lines
1.2 KiB
CMake
47 lines
1.2 KiB
CMake
# All libraries in this directory tree are overlays.
|
|
list(APPEND SWIFT_EXTRA_FLAGS
|
|
"-autolink-force-load")
|
|
|
|
# Build the swiftObjC dylib.
|
|
set(SHARED_LIBRARY ON)
|
|
|
|
set(SWIFTOBJC_SOURCES
|
|
ObjectiveC.swift)
|
|
|
|
# Definition of ObjCBool is platform-specific.
|
|
if (SWIFT_DEPLOYMENT_OS MATCHES "^macosx"
|
|
OR
|
|
(SWIFT_DEPLOYMENT_OS MATCHES "^iphone"
|
|
AND NOT (CMAKE_OSX_ARCHITECTURES MATCHES "64$")))
|
|
# OS X or 32-bit iOS: Objective-C BOOL is signed char
|
|
list(APPEND SWIFTOBJC_SOURCES
|
|
ObjectiveC-BOOLchar.swift)
|
|
else()
|
|
# Others: Objective-C BOOL is C99/C++ bool.
|
|
list(APPEND SWIFTOBJC_SOURCES
|
|
ObjectiveC-BOOLbool.swift)
|
|
endif()
|
|
|
|
add_swift_library(swiftObjectiveC INSTALL
|
|
${SWIFTOBJC_SOURCES}
|
|
DEPENDS swift_stdlib_core swiftDarwin)
|
|
|
|
|
|
add_subdirectory(Darwin)
|
|
add_subdirectory(Dispatch)
|
|
add_subdirectory(CoreGraphics)
|
|
add_subdirectory(Foundation)
|
|
add_subdirectory(SpriteKit)
|
|
|
|
if (SWIFT_DEPLOYMENT_OS MATCHES "^macosx")
|
|
add_subdirectory(AppKit)
|
|
else()
|
|
add_subdirectory(UIKit)
|
|
endif()
|
|
|
|
# FIXME: Temporarily allow one to disable building this overlay module.
|
|
option(SWIFT_BUILD_XCTEST "Build XCTest overlay" YES)
|
|
if (SWIFT_BUILD_XCTEST)
|
|
add_subdirectory(XCTest)
|
|
endif()
|