2014-10-09 13:42:51 +02:00
|
|
|
# Sources
|
|
|
|
file(GLOB SRCS_G "src/*.cpp")
|
2020-02-14 11:07:32 +01:00
|
|
|
POCO_SOURCES_AUTO(TEST_SRCS ${SRCS_G})
|
2014-10-09 13:42:51 +02:00
|
|
|
|
|
|
|
# Headers
|
2020-02-14 11:07:32 +01:00
|
|
|
file(GLOB_RECURSE HDRS_G "src/*.h")
|
|
|
|
POCO_HEADERS_AUTO(TEST_SRCS ${HDRS_G})
|
2014-10-09 13:42:51 +02:00
|
|
|
|
2020-02-14 11:07:32 +01:00
|
|
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS OFF
|
|
|
|
src/WinDriver.cpp
|
2014-10-09 13:42:51 +02:00
|
|
|
)
|
|
|
|
|
2020-02-14 11:07:32 +01:00
|
|
|
POCO_SOURCES_AUTO_PLAT(TEST_SRCS WINCE
|
|
|
|
src/WinCEDriver.cpp
|
2014-10-09 13:42:51 +02:00
|
|
|
)
|
|
|
|
|
2020-02-14 11:07:32 +01:00
|
|
|
add_executable(NetSSLWin-testrunner ${TEST_SRCS})
|
|
|
|
add_test(
|
|
|
|
NAME NetSSLWin
|
|
|
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
|
|
|
COMMAND NetSSLWin-testrunner -ignore ${CMAKE_SOURCE_DIR}/cppignore.lnx -all
|
|
|
|
)
|
2020-01-14 21:45:56 +01:00
|
|
|
set_tests_properties(NetSSLWin PROPERTIES ENVIRONMENT POCO_BASE=${CMAKE_SOURCE_DIR})
|
2018-06-03 18:17:50 +02:00
|
|
|
target_link_libraries(NetSSLWin-testrunner PUBLIC Poco::NetSSL Poco::Util Poco::XML CppUnit)
|
2014-10-09 13:42:51 +02:00
|
|
|
|
|
|
|
# The test is run in the build directory. So the test data is copied there too
|
2020-02-14 11:07:32 +01:00
|
|
|
add_custom_command(
|
|
|
|
TARGET NetSSLWin-testrunner POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/any.pem ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/rootcert.pem ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/testrunner.xml ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/NetSSLWin.xml
|
|
|
|
)
|