diff options
author | Andreas Schneider <mail@cynapses.org> | 2010-03-02 23:48:45 +0100 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2010-03-02 23:49:21 +0100 |
commit | 8bcb835aa4ffb4e11deeb6ecea17387193ef7e8f (patch) | |
tree | 29b0f0f1bea4df1116957e880afedb3100ffc820 | |
parent | eec35329556799b9301d3856e60951a274ce2ea5 (diff) | |
download | libssh-8bcb835aa4ffb4e11deeb6ecea17387193ef7e8f.tar.gz libssh-8bcb835aa4ffb4e11deeb6ecea17387193ef7e8f.tar.xz libssh-8bcb835aa4ffb4e11deeb6ecea17387193ef7e8f.zip |
Fixed unit testing.
-rw-r--r-- | DefineOptions.cmake | 4 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 2 | ||||
-rw-r--r-- | tests/unittests/torture_misc.c | 2 |
3 files changed, 7 insertions, 1 deletions
diff --git a/DefineOptions.cmake b/DefineOptions.cmake index ce251e12..f7a52442 100644 --- a/DefineOptions.cmake +++ b/DefineOptions.cmake @@ -9,3 +9,7 @@ option(WITH_GCRYPT "Compile against libgcrypt" OFF) option(WITH_PCAP "Compile with Pcap generation support" ON) option(WITH_INTERNAL_DOC "Compile doxygen internal documentation" OFF) option(WITH_TESTING "Build with unit tests" OFF) +if (WITH_TESTING) + set(WITH_STATIC_LIB ON) +endif (WITH_TESTING) + diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 3acee2ea..02f40fb4 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -12,7 +12,7 @@ include_directories( # create test library add_library(${TORTURE_LIBRARY} SHARED torture.c cmdline.c) -target_link_libraries(${TORTURE_LIBRARY} ${CHECK_LIBRARIES} ${LIBSSH_LIBRARY}) +target_link_libraries(${TORTURE_LIBRARY} ${CHECK_LIBRARIES} ${LIBSSH_STATIC_LIBRARY}) set(TEST_TARGET_LIBRARIES ${SUPPORT_LIBRARY}) diff --git a/tests/unittests/torture_misc.c b/tests/unittests/torture_misc.c index 54fc7c30..bc0442c1 100644 --- a/tests/unittests/torture_misc.c +++ b/tests/unittests/torture_misc.c @@ -1,5 +1,7 @@ #include <sys/types.h> #include <pwd.h> + +#define LIBSSH_STATIC #include <libssh/priv.h> #include "torture.h" |