Skip to content

[WIP, DNM] Foundation cross-import overlay #760

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ let package = Package(
dependencies: [
"Testing",
],
exclude: ["Foundation.swiftoverlay"],
swiftSettings: .packageSettings
),
],
Expand Down
1 change: 1 addition & 0 deletions Sources/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,3 +105,4 @@ include(AvailabilityDefinitions)
include(CompilerSettings)
add_subdirectory(_TestingInternals)
add_subdirectory(Testing)
add_subdirectory(_Testing_Foundation)
24 changes: 24 additions & 0 deletions Sources/_Testing_Foundation/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2024 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
# See http://swift.org/CONTRIBUTORS.txt for Swift project authors

add_library(_Testing_Foundation SHARED
Events/Clock+Date.swift
ReexportTesting.swift)
target_link_libraries(_Testing_Foundation PUBLIC
Testing)
add_dependencies(_Testing_Foundation
Testing)
target_compile_options(_Testing_Foundation PRIVATE
-enable-library-evolution
-emit-module-interface -emit-module-interface-path $<TARGET_PROPERTY:_Testing_Foundation,Swift_MODULE_DIRECTORY>/_Testing_Foundation.swiftinterface)

get_swift_testing_install_lib_dir(SHARED overlays_destination_dir)
install(FILES $<TARGET_PROPERTY:_Testing_Foundation,Swift_MODULE_DIRECTORY>/Foundation.swiftoverlay
DESTINATION "${overlays_destination_dir}/Testing.swiftcrossimport/Foundation.swiftoverlay")

_swift_testing_install_target(_Testing_Foundation)
3 changes: 3 additions & 0 deletions Sources/_Testing_Foundation/Foundation.swiftoverlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
version: 1
modules:
- name: _Testing_Foundation