diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2015-09-07 07:46:11 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2015-09-07 07:46:11 +0200 |
commit | 5b586fdfecbe12f3f8e69099d809ca96c7cb978e (patch) | |
tree | 8ee49721e6209c1189fe717a299c9c0eecaab904 /tests | |
parent | 2f193b5cbb0c57160d3c590140bc04befccfbb32 (diff) | |
download | libssh-5b586fdfecbe12f3f8e69099d809ca96c7cb978e.tar.gz libssh-5b586fdfecbe12f3f8e69099d809ca96c7cb978e.tar.xz libssh-5b586fdfecbe12f3f8e69099d809ca96c7cb978e.zip |
cmake: Handle libssh threas library correctly
This should fix the build on Windows and would not install pkg files.
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 4 | ||||
-rw-r--r-- | tests/unittests/CMakeLists.txt | 12 |
2 files changed, 9 insertions, 7 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3bbb3309..d87c9c2f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -22,12 +22,12 @@ set(TORTURE_LINK_LIBRARIES ${LIBSSH_STATIC_LIBRARY} ${LIBSSH_LINK_LIBRARIES}) -if (Threads_FOUND) +if (LIBSSH_THREADS) set(TORTURE_LINK_LIBRARIES ${TORTURE_LINK_LIBRARIES} ${LIBSSH_THREADS_STATIC_LIBRARY} ${LIBSSH_THREADS_LINK_LIBRARIES}) -endif () +endif (LIBSSH_THREADS) # create test library add_library(${TORTURE_LIBRARY} STATIC cmdline.c torture.c) diff --git a/tests/unittests/CMakeLists.txt b/tests/unittests/CMakeLists.txt index 1c9b6914..21825978 100644 --- a/tests/unittests/CMakeLists.txt +++ b/tests/unittests/CMakeLists.txt @@ -14,11 +14,13 @@ if (UNIX AND NOT WIN32) # requires ssh-keygen add_cmocka_test(torture_keyfiles torture_keyfiles.c ${TORTURE_LIBRARY}) add_cmocka_test(torture_pki torture_pki.c ${TORTURE_LIBRARY}) - # requires pthread - add_cmocka_test(torture_rand torture_rand.c ${TORTURE_LIBRARY}) # requires /dev/null add_cmocka_test(torture_channel torture_channel.c ${TORTURE_LIBRARY}) - if (WITH_SERVER AND Threads_FOUND) - add_cmocka_test(torture_server_x11 torture_server_x11.c ${TORTURE_LIBRARY}) - endif (WITH_SERVER AND Threads_FOUND) + # requires pthread + if (LIBSSH_THREADS) + add_cmocka_test(torture_rand torture_rand.c ${TORTURE_LIBRARY}) + if (WITH_SERVER) + add_cmocka_test(torture_server_x11 torture_server_x11.c ${TORTURE_LIBRARY}) + endif (WITH_SERVER) + endif (LIBSSH_THREADS) endif (UNIX AND NOT WIN32) |