File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,13 @@ if(BSD_OVERLAY_FOUND)
3939 ${BSD_OVERLAY_LDFLAGS} )
4040endif ()
4141
42+ if (CMAKE_SWIFT_RUNTIME_LIBDIR)
43+ target_link_libraries (bsdtestharness
44+ PRIVATE
45+ -L${CMAKE_SWIFT_RUNTIME_LIBDIR} -lswiftCore -lswiftSwiftOnoneSupport
46+ -Wl,-rpath -Wl,${CMAKE_SWIFT_RUNTIME_LIBDIR} )
47+ endif ()
48+
4249function (add_unit_test name )
4350 set (options DISABLED_TEST)
4451 set (single_value_args)
@@ -77,6 +84,12 @@ function(add_unit_test name)
7784 PRIVATE
7885 ${BSD_OVERLAY_LDFLAGS} )
7986 endif ()
87+ if (CMAKE_SWIFT_RUNTIME_LIBDIR)
88+ target_link_libraries (${name}
89+ PRIVATE
90+ -L${CMAKE_SWIFT_RUNTIME_LIBDIR} -lswiftCore -lswiftSwiftOnoneSupport
91+ -Wl,-rpath -Wl,${CMAKE_SWIFT_RUNTIME_LIBDIR} )
92+ endif ()
8093 target_link_libraries (${name} PRIVATE bsdtests)
8194 add_test (NAME ${name}
8295 COMMAND bsdtestharness $<TARGET_FILE:${name} >)
You can’t perform that action at this time.
0 commit comments