mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-27 08:22:31 +00:00
be7ce4110e
This reverts commit e96515433d
.
25 lines
527 B
CMake
25 lines
527 B
CMake
enable_testing()
|
|
|
|
if(NOT PostgreSQL_FOUND)
|
|
find_package(PostgreSQL REQUIRED)
|
|
endif()
|
|
|
|
file(GLOB TEST_SOURCES test*.cxx unit/test_*.cxx runner.cxx)
|
|
|
|
add_executable(runner ${TEST_SOURCES})
|
|
target_link_libraries(runner PUBLIC pqxx)
|
|
target_include_directories(runner PRIVATE ${PostgreSQL_INCLUDE_DIRS})
|
|
add_test(
|
|
NAME runner
|
|
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}
|
|
COMMAND runner
|
|
)
|
|
|
|
if(INSTALL_TEST)
|
|
install(
|
|
PROGRAMS runner
|
|
TYPE BIN
|
|
RENAME libpqxx-test-runner
|
|
)
|
|
endif()
|