Skip to content

Commit fa43fb6

Browse files
committed
Don't link to dispatch in WASI
WASI doesn't support `libdispatch`
1 parent 79a443a commit fa43fb6

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ project(SwiftTesting
1616
LANGUAGES CXX Swift)
1717

1818
if(NOT APPLE)
19-
find_package(dispatch CONFIG)
19+
if(NOT WASI)
20+
find_package(dispatch CONFIG)
21+
endif()
2022
find_package(Foundation CONFIG)
2123
endif()
2224

Sources/Testing/CMakeLists.txt

+4-1
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,11 @@ add_library(Testing
9797
target_link_libraries(Testing PRIVATE
9898
_TestingInternals)
9999
if(NOT APPLE)
100+
if(NOT WASI)
101+
target_link_libraries(Testing PUBLIC
102+
dispatch)
103+
endif()
100104
target_link_libraries(Testing PUBLIC
101-
dispatch
102105
Foundation)
103106
endif()
104107
if(NOT BUILD_SHARED_LIBS)

0 commit comments

Comments
 (0)