Skip to content

Commit 79a443a

Browse files
committed
[CMake] Explicitly link Testing to Foundation
1 parent 22d6c76 commit 79a443a

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ endif()
1515
project(SwiftTesting
1616
LANGUAGES CXX Swift)
1717

18+
if(NOT APPLE)
19+
find_package(dispatch CONFIG)
20+
find_package(Foundation CONFIG)
21+
endif()
22+
1823
include(GNUInstallDirs)
1924

2025
list(APPEND CMAKE_MODULE_PATH

Sources/Testing/CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ add_library(Testing
9696
Traits/Trait.swift)
9797
target_link_libraries(Testing PRIVATE
9898
_TestingInternals)
99+
if(NOT APPLE)
100+
target_link_libraries(Testing PUBLIC
101+
dispatch
102+
Foundation)
103+
endif()
99104
if(NOT BUILD_SHARED_LIBS)
100105
# When building a static library, tell clients to autolink the internal
101106
# library.

0 commit comments

Comments
 (0)