Skip to content

Commit d5b7361

Browse files
committed
[WIP] Foundation cross-import overlay
1 parent d9f8d2f commit d5b7361

File tree

4 files changed

+32
-0
lines changed

4 files changed

+32
-0
lines changed

Package.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ let package = Package(
9696
dependencies: [
9797
"Testing",
9898
],
99+
exclude: ["Foundation.swiftoverlay"],
99100
swiftSettings: .packageSettings
100101
),
101102
],

Sources/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,3 +105,4 @@ include(AvailabilityDefinitions)
105105
include(CompilerSettings)
106106
add_subdirectory(_TestingInternals)
107107
add_subdirectory(Testing)
108+
add_subdirectory(_Testing_Foundation)
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# This source file is part of the Swift.org open source project
2+
#
3+
# Copyright (c) 2024 Apple Inc. and the Swift project authors
4+
# Licensed under Apache License v2.0 with Runtime Library Exception
5+
#
6+
# See http://swift.org/LICENSE.txt for license information
7+
# See http://swift.org/CONTRIBUTORS.txt for Swift project authors
8+
9+
add_library(_Testing_Foundation SHARED
10+
Events/Clock+Date.swift
11+
ReexportTesting.swift)
12+
target_link_libraries(_Testing_Foundation PUBLIC
13+
Testing)
14+
target_link_libraries(Testing PUBLIC
15+
Foundation)
16+
add_dependencies(_Testing_Foundation
17+
Testing
18+
Foundation)
19+
target_compile_options(_Testing_Foundation PRIVATE
20+
-enable-library-evolution
21+
-emit-module-interface -emit-module-interface-path $<TARGET_PROPERTY:Testing,Swift_MODULE_DIRECTORY>/_Testing_Foundation.swiftinterface)
22+
23+
get_swift_testing_install_lib_dir(SHARED overlays_destination_dir)
24+
install(FILES $<TARGET_PROPERTY:${_Testing_Foundation},Swift_MODULE_DIRECTORY>/Foundation.swiftoverlay
25+
DESTINATION "${overlays_destination_dir}/Testing.swiftcrossimport/Foundation.swiftoverlay")
26+
27+
_swift_testing_install_target(_Testing_Foundation)
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version: 1
2+
modules:
3+
- name: _Testing_Foundation

0 commit comments

Comments
 (0)