2010-03-02 15:47:14 +03:00
|
|
|
project(tests C)
|
|
|
|
|
2010-09-08 13:41:14 +04:00
|
|
|
if (UNIX AND NOT LINUX)
|
2010-09-03 17:38:12 +04:00
|
|
|
find_package(Argp)
|
2010-09-08 13:41:14 +04:00
|
|
|
endif (UNIX AND NOT LINUX)
|
2010-03-02 15:47:14 +03:00
|
|
|
|
|
|
|
set(TORTURE_LIBRARY torture)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${LIBSSH_PUBLIC_INCLUDE_DIRS}
|
|
|
|
${CHECK_INCLUDE_DIRS}
|
2010-09-03 17:38:12 +04:00
|
|
|
${ARGP_INCLUDE_DIRS}
|
2010-03-02 15:47:14 +03:00
|
|
|
${CMAKE_BINARY_DIR}
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
# create test library
|
|
|
|
add_library(${TORTURE_LIBRARY} SHARED torture.c cmdline.c)
|
2010-09-06 16:54:16 +04:00
|
|
|
target_link_libraries(${TORTURE_LIBRARY}
|
|
|
|
${CHECK_LIBRARIES}
|
|
|
|
${LIBSSH_STATIC_LIBRARY}
|
|
|
|
${LIBSSH_LINK_LIBRARIES}
|
2010-09-08 18:32:54 +04:00
|
|
|
${LIBSSH_THREADS_STATIC_LIBRARY}
|
|
|
|
${LIBSSH_THREADS_LINK_LIBRARIES}
|
2010-09-06 16:54:16 +04:00
|
|
|
${ARGP_LIBRARIES}
|
|
|
|
)
|
2010-03-02 15:47:14 +03:00
|
|
|
|
2010-03-03 02:39:20 +03:00
|
|
|
set(TEST_TARGET_LIBRARIES ${SUPPORT_LIBRARY} ${LIBSSH_LINK_LIBRARIES})
|
2010-03-02 15:47:14 +03:00
|
|
|
|
|
|
|
add_subdirectory(unittests)
|
2010-06-03 14:36:00 +04:00
|
|
|
if (WITH_CLIENT_TESTING)
|
|
|
|
add_subdirectory(client)
|
|
|
|
endif (WITH_CLIENT_TESTING)
|