Skip to content

Commit ffbb641

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

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-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: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
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+
add_dependencies(_Testing_Foundation
15+
Testing)
16+
target_compile_options(_Testing_Foundation PRIVATE
17+
-enable-library-evolution
18+
-emit-module-interface -emit-module-interface-path $<TARGET_PROPERTY:_Testing_Foundation,Swift_MODULE_DIRECTORY>/_Testing_Foundation.swiftinterface)
19+
20+
get_swift_testing_install_lib_dir(SHARED overlays_destination_dir)
21+
install(FILES $<TARGET_PROPERTY:_Testing_Foundation,Swift_MODULE_DIRECTORY>/Foundation.swiftoverlay
22+
DESTINATION "${overlays_destination_dir}/Testing.swiftcrossimport/Foundation.swiftoverlay")
23+
24+
_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)