link tests targets with thread library (#79)

This commit is contained in:
IbrahimSaad 2022-06-11 07:32:05 +02:00 committed by GitHub
parent 2ef9f168d3
commit 399616b408
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,8 +1,11 @@
set(test_names test_subprocess test_cat test_env test_err_redirection test_split test_main test_ret_code)
set(test_files env_script.sh write_err.sh write_err.txt)
find_package(Threads REQUIRED)
foreach(test_name IN LISTS test_names)
add_executable(${test_name} ${test_name}.cc)
target_link_libraries(${test_name} PRIVATE Threads::Threads)
add_test(
NAME ${test_name}