Skip to content
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

Build: Correct BlocksRuntime dependency for Darwin #577

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
6 changes: 4 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ if(LibRT_FOUND)
endif()
target_link_libraries(dispatch PRIVATE
Threads::Threads)
target_link_libraries(dispatch PUBLIC
BlocksRuntime::BlocksRuntime)
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
target_link_libraries(dispatch PUBLIC
BlocksRuntime::BlocksRuntime)
endif()
if(CMAKE_SYSTEM_NAME STREQUAL Windows)
target_link_libraries(dispatch PRIVATE
ShLwApi
Expand Down
7 changes: 5 additions & 2 deletions src/swift/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,11 @@ set_target_properties(swiftDispatch PROPERTIES
Swift_MODULE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/swift
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_BINARY_DIR}/swift)
target_link_libraries(swiftDispatch PRIVATE
DispatchStubs
BlocksRuntime::BlocksRuntime)
DispatchStubs)
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
target_link_libraries(swiftDispatch PRIVATE
BlocksRuntime::BlocksRuntime)
endif()
target_link_libraries(swiftDispatch PUBLIC
dispatch)
add_dependencies(swiftDispatch module-maps)
Expand Down
7 changes: 5 additions & 2 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,11 @@ function(add_unit_test name)
target_link_libraries(${name}
PRIVATE
dispatch
Threads::Threads
BlocksRuntime::BlocksRuntime)
Threads::Threads)
if(NOT CMAKE_SYSTEM_NAME STREQUAL Darwin)
target_link_libraries(${name} PRIVATE
BlocksRuntime::BlocksRuntime)
endif()
target_link_libraries(${name} PRIVATE bsdtests)
add_test(NAME ${name}
COMMAND bsdtestharness $<TARGET_FILE:${name}>)
Expand Down