a25790d343
Fix a build breakage when '-DWITH_SERVER=OFF' is set: skip building the pkd test for that case. Add some missing includes for the OpenIndiana and FreeBSD builds. Signed-off-by: Jon Simons <jon@jonsimons.org> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
53 строки
1.1 KiB
CMake
53 строки
1.1 KiB
CMake
project(tests C)
|
|
|
|
if (BSD OR SOLARIS OR OSX)
|
|
find_package(Argp)
|
|
endif (BSD OR SOLARIS OR OSX)
|
|
|
|
set(TORTURE_LIBRARY torture)
|
|
|
|
include_directories(
|
|
${LIBSSH_PUBLIC_INCLUDE_DIRS}
|
|
${CMOCKA_INCLUDE_DIR}
|
|
${OPENSSL_INCLUDE_DIRS}
|
|
${GCRYPT_INCLUDE_DIRS}
|
|
${ZLIB_INCLUDE_DIRS}
|
|
${CMAKE_BINARY_DIR}
|
|
${CMAKE_SOURCE_DIR}/src
|
|
${CMAKE_CURRENT_SOURCE_DIR}
|
|
)
|
|
|
|
# create test library
|
|
add_library(${TORTURE_LIBRARY} STATIC cmdline.c torture.c)
|
|
target_link_libraries(${TORTURE_LIBRARY}
|
|
${CMOCKA_LIBRARY}
|
|
${LIBSSH_STATIC_LIBRARY}
|
|
${LIBSSH_LINK_LIBRARIES}
|
|
${LIBSSH_THREADS_STATIC_LIBRARY}
|
|
${LIBSSH_THREADS_LINK_LIBRARIES}
|
|
${ARGP_LIBRARIES}
|
|
)
|
|
|
|
set(TEST_TARGET_LIBRARIES
|
|
${TORTURE_LIBRARY}
|
|
${CMOCKA_LIBRARY}
|
|
${LIBSSH_STATIC_LIBRARY}
|
|
${LIBSSH_LINK_LIBRARIES}
|
|
${LIBSSH_THREADS_STATIC_LIBRARY}
|
|
${LIBSSH_THREADS_LINK_LIBRARIES}
|
|
)
|
|
|
|
add_subdirectory(unittests)
|
|
|
|
if (WITH_CLIENT_TESTING)
|
|
add_subdirectory(client)
|
|
endif (WITH_CLIENT_TESTING)
|
|
|
|
if (WITH_BENCHMARKS)
|
|
add_subdirectory(benchmarks)
|
|
endif (WITH_BENCHMARKS)
|
|
|
|
if (WITH_SERVER)
|
|
add_subdirectory(pkd)
|
|
endif (WITH_SERVER)
|