diff options
Diffstat (limited to 'tests/unittests/CMakeLists.txt')
-rw-r--r-- | tests/unittests/CMakeLists.txt | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/unittests/CMakeLists.txt b/tests/unittests/CMakeLists.txt index d518dd21..e833481a 100644 --- a/tests/unittests/CMakeLists.txt +++ b/tests/unittests/CMakeLists.txt @@ -32,11 +32,12 @@ if (UNIX AND NOT WIN32) # requires /dev/null add_cmocka_test(torture_channel torture_channel.c ${TORTURE_LIBRARY}) # requires pthread - if (LIBSSH_THREADS) + if (CMAKE_USE_PTHREADS_INIT) add_cmocka_test(torture_rand torture_rand.c ${TORTURE_LIBRARY}) + target_link_libraries(torture_rand Threads::Threads) # Not working correctly #if (WITH_SERVER) # add_cmocka_test(torture_server_x11 torture_server_x11.c ${TORTURE_LIBRARY}) #endif (WITH_SERVER) - endif (LIBSSH_THREADS) + endif () endif (UNIX AND NOT WIN32) |