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

Link tests to Threads::Threads #473

Merged
merged 1 commit into from
Jul 17, 2024
Merged
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
4 changes: 3 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ message(STATUS "zenoh-c tests")

add_custom_target(tests)

find_package(Threads REQUIRED)

file(GLOB files "${CMAKE_CURRENT_SOURCE_DIR}/*.c")
foreach(file ${files})
get_filename_component(target ${file} NAME_WE)
Expand All @@ -20,7 +22,7 @@ foreach(file ${files})
add_executable(${target} EXCLUDE_FROM_ALL ${file})
add_dependencies(tests ${target})
add_dependencies(${target} zenohc::lib)
target_link_libraries(${target} PRIVATE zenohc::lib)
target_link_libraries(${target} PRIVATE zenohc::lib Threads::Threads)
copy_dlls(${target})
set_property(TARGET ${target} PROPERTY C_STANDARD 11)
add_test(NAME "${test_type}_${target}" COMMAND ${target})
Expand Down