Skip to content

Commit

Permalink
Don't link to dispatch in WASI
Browse files Browse the repository at this point in the history
WASI doesn't support `libdispatch`
  • Loading branch information
rintaro committed Sep 17, 2024
1 parent 79a443a commit c2f8ccc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ project(SwiftTesting
LANGUAGES CXX Swift)

if(NOT APPLE)
find_package(dispatch CONFIG)
if(NOT CMAKE_SYSTEM_NAME STREQUAL WASI)
find_package(dispatch CONFIG)
endif()
find_package(Foundation CONFIG)
endif()

Expand Down
5 changes: 4 additions & 1 deletion Sources/Testing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ add_library(Testing
target_link_libraries(Testing PRIVATE
_TestingInternals)
if(NOT APPLE)
if(NOT CMAKE_SYSTEM_NAME STREQUAL WASI)
target_link_libraries(Testing PUBLIC
dispatch)
endif()
target_link_libraries(Testing PUBLIC
dispatch
Foundation)
endif()
if(NOT BUILD_SHARED_LIBS)
Expand Down

0 comments on commit c2f8ccc

Please sign in to comment.