2015-08-21 20:22:34 +00:00
|
|
|
set(TESTS_SRC
|
|
|
|
"Base64.cpp"
|
|
|
|
"Crypto.cpp"
|
|
|
|
"Identity.cpp"
|
|
|
|
"Utility.cpp"
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
if(WITH_TESTS)
|
|
|
|
find_package(Boost COMPONENTS
|
|
|
|
system filesystem regex program_options date_time thread chrono
|
|
|
|
unit_test_framework REQUIRED
|
|
|
|
)
|
|
|
|
|
2015-08-21 21:27:25 +00:00
|
|
|
add_executable(${TESTS_NAME} ${TESTS_SRC})
|
2015-08-21 20:22:34 +00:00
|
|
|
target_link_libraries(
|
2015-08-21 21:27:25 +00:00
|
|
|
${TESTS_NAME} ${CORE_NAME} ${DL_LIB} ${Boost_LIBRARIES} ${CRYPTO++_LIBRARIES}
|
|
|
|
${CMAKE_THREAD_LIBS_INIT}
|
2015-08-21 20:22:34 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
enable_testing()
|
2015-08-21 21:27:25 +00:00
|
|
|
add_test(i2pdTest ${TESTS_NAME})
|
|
|
|
install(TARGETS
|
|
|
|
${TESTS_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
|
|
)
|
2015-08-21 20:22:34 +00:00
|
|
|
endif()
|