2010-03-02 15:47:14 +03:00
|
|
|
project(tests C)
|
|
|
|
|
2011-08-09 21:52:26 +04:00
|
|
|
if (BSD OR SOLARIS)
|
|
|
|
find_package(Argp)
|
|
|
|
endif (BSD OR SOLARIS)
|
2011-01-13 20:34:04 +03:00
|
|
|
|
2010-03-02 15:47:14 +03:00
|
|
|
set(TORTURE_LIBRARY torture)
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${LIBSSH_PUBLIC_INCLUDE_DIRS}
|
2010-12-29 21:49:07 +03:00
|
|
|
${CMOCKERY_INCLUDE_DIRS}
|
2010-12-29 22:17:36 +03:00
|
|
|
${OPENSSL_INCLUDE_DIRS}
|
|
|
|
${GCRYPT_INCLUDE_DIRS}
|
|
|
|
${ZLIB_INCLUDE_DIRS}
|
|
|
|
${CMAKE_BINARY_DIR}
|
2010-09-29 13:26:16 +04:00
|
|
|
${CMAKE_SOURCE_DIR}/src
|
2010-03-02 15:47:14 +03:00
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
|
|
)
|
|
|
|
|
|
|
|
# create test library
|
2011-01-13 20:34:04 +03:00
|
|
|
add_library(${TORTURE_LIBRARY} STATIC cmdline.c torture.c)
|
2010-09-06 16:54:16 +04:00
|
|
|
target_link_libraries(${TORTURE_LIBRARY}
|
2010-12-28 15:41:33 +03:00
|
|
|
${CMOCKERY_LIBRARY}
|
2010-09-06 16:54:16 +04:00
|
|
|
${LIBSSH_STATIC_LIBRARY}
|
|
|
|
${LIBSSH_LINK_LIBRARIES}
|
2010-09-08 18:32:54 +04:00
|
|
|
${LIBSSH_THREADS_STATIC_LIBRARY}
|
|
|
|
${LIBSSH_THREADS_LINK_LIBRARIES}
|
2011-01-13 20:34:04 +03:00
|
|
|
${ARGP_LIBRARIES}
|
2010-09-06 16:54:16 +04:00
|
|
|
)
|
2010-03-02 15:47:14 +03:00
|
|
|
|
2010-12-29 22:17:36 +03:00
|
|
|
set(TEST_TARGET_LIBRARIES
|
|
|
|
${TORTURE_LIBRARY}
|
|
|
|
${CMOCKERY_LIBRARY}
|
|
|
|
${LIBSSH_STATIC_LIBRARY}
|
|
|
|
${LIBSSH_LINK_LIBRARIES}
|
|
|
|
${LIBSSH_THREADS_STATIC_LIBRARY}
|
|
|
|
${LIBSSH_THREADS_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)
|
2010-12-28 15:17:27 +03:00
|
|
|
|
|
|
|
if (WITH_BENCHMARKS)
|
|
|
|
add_subdirectory(benchmarks)
|
2010-12-29 22:11:00 +03:00
|
|
|
endif (WITH_BENCHMARKS)
|
2010-12-28 15:17:27 +03:00
|
|
|
|