Skip to content

Commit

Permalink
Update CMakeLists.txt (eclipse-zenoh#473)
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored and DenisBiryukov91 committed Jul 25, 2024
1 parent 7879d17 commit dcff1ce
Showing 1 changed file with 3 additions and 1 deletion.
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 Down Expand Up @@ -34,7 +36,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

0 comments on commit dcff1ce

Please sign in to comment.