mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Runtimes: build Observation when running macOS smoketest
Piggyback the addition of a flag to specify the path of the CMakeConfig.h header needed to compile Observation (needed when consuming SwiftCore through the fine module), and the declaration of SwiftShims as a dependency. Addresses rdar://149241712
This commit is contained in:
@@ -1711,7 +1711,7 @@ if(SWIFT_ENABLE_NEW_RUNTIME_BUILD)
|
|||||||
# To ensure incremental builds work as expected
|
# To ensure incremental builds work as expected
|
||||||
BUILD_ALWAYS 1
|
BUILD_ALWAYS 1
|
||||||
CMAKE_ARGS
|
CMAKE_ARGS
|
||||||
-DSwift_ENABLE_RUNTIMES=StringProcessing|Synchronization|Distributed
|
-DSwift_ENABLE_RUNTIMES=StringProcessing|Synchronization|Distributed|Observation
|
||||||
-DBUILD_SHARED_LIBS=YES
|
-DBUILD_SHARED_LIBS=YES
|
||||||
-DCMAKE_Swift_COMPILER_WORKS:BOOLEAN=YES
|
-DCMAKE_Swift_COMPILER_WORKS:BOOLEAN=YES
|
||||||
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
|
-DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}
|
||||||
|
|||||||
@@ -92,3 +92,14 @@ if(SwiftRuntime_ENABLE_differentiation)
|
|||||||
CMAKE_ARGS
|
CMAKE_ARGS
|
||||||
${COMMON_OPTIONS})
|
${COMMON_OPTIONS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Observation
|
||||||
|
if(SwiftRuntime_ENABLE_observation)
|
||||||
|
ExternalProject_Add(Observation
|
||||||
|
PREFIX "Observation"
|
||||||
|
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/Observation"
|
||||||
|
INSTALL_DIR "${CMAKE_INSTALL_PREFIX}"
|
||||||
|
INSTALL_COMMAND ""
|
||||||
|
CMAKE_ARGS
|
||||||
|
${COMMON_OPTIONS})
|
||||||
|
endif()
|
||||||
|
|||||||
@@ -97,8 +97,12 @@ set_target_properties(swiftObservation PROPERTIES
|
|||||||
# FIXME: We should split out the parts that are needed by the runtime to avoid
|
# FIXME: We should split out the parts that are needed by the runtime to avoid
|
||||||
# pulling in headers from the compiler.
|
# pulling in headers from the compiler.
|
||||||
target_include_directories(swiftObservation PRIVATE
|
target_include_directories(swiftObservation PRIVATE
|
||||||
"${${PROJECT_NAME}_SWIFTC_SOURCE_DIR}/include")
|
"${${PROJECT_NAME}_SWIFTC_SOURCE_DIR}/include"
|
||||||
|
# For `swift/runtime/CMakeConfig.h`, which should be generated
|
||||||
|
# by the Core build system.
|
||||||
|
"${${PROJECT_NAME}_PATH_TO_SWIFT_RUNTIME_HEADERS}")
|
||||||
target_link_libraries(swiftObservation PRIVATE
|
target_link_libraries(swiftObservation PRIVATE
|
||||||
|
swiftShims
|
||||||
swiftCore
|
swiftCore
|
||||||
swift_Concurrency
|
swift_Concurrency
|
||||||
$<$<PLATFORM_ID:Android>:swiftAndroid>
|
$<$<PLATFORM_ID:Android>:swiftAndroid>
|
||||||
|
|||||||
Reference in New Issue
Block a user