Skip to content

Commit 399616b

Browse files
authored
link tests targets with thread library (#79)
1 parent 2ef9f16 commit 399616b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
set(test_names test_subprocess test_cat test_env test_err_redirection test_split test_main test_ret_code)
22
set(test_files env_script.sh write_err.sh write_err.txt)
33

4+
find_package(Threads REQUIRED)
5+
46
foreach(test_name IN LISTS test_names)
57
add_executable(${test_name} ${test_name}.cc)
8+
target_link_libraries(${test_name} PRIVATE Threads::Threads)
69

710
add_test(
811
NAME ${test_name}

0 commit comments

Comments
 (0)