Skip to content

CMake: Fix missing librt target #5056

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
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 CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ if(NOT SwiftFoundation_MODULE_TRIPLE)
endif()

# System dependencies
find_package(LibRT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my context, is there a reason that's preventing us from fixing this on the dispatch side instead of applying a workaround to Foundation (and presumably any other project that imports dispatch via CMake in the toolchain)? Is there a way we can just add this to the exported config for dispatch?

find_package(dispatch CONFIG)
if(NOT dispatch_FOUND)
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Android")
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/FindLibRT.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#
# Find librt library and headers.
#
# The mdoule defines the following variables:
# The module defines the following variables:
#
# ::
#
Expand Down