Skip to content

Commit 279629f

Browse files
authored
OpenBSD needs execinfo as well. (#1318)
Add OpenBSD to the CMake clause that adds libexecinfo. ### Motivation: `swift test` fails on some projects with `ld: error: undefined reference due to --no-allow-shlib-undefined: backtrace`; `backtrace` is provided by `libexecinfo` on OpenBSD. ### Modifications: Add OpenBSD to the CMake clause that adds libexecinfo. ### Checklist: - [x] Code and documentation should follow the style of the [Style Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md). - [x] If public symbols are renamed or modified, DocC references should be updated.
1 parent 368a94d commit 279629f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Sources/Testing/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ if(NOT APPLE)
124124
endif()
125125
target_link_libraries(Testing PUBLIC
126126
Foundation)
127-
if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
127+
if (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" OR
128+
CMAKE_SYSTEM_NAME STREQUAL "OpenBSD")
128129
target_link_libraries(Testing PUBLIC execinfo)
129130
endif()
130131
endif()

0 commit comments

Comments
 (0)