oxen-mq/tests/CMakeLists.txt
Jason Rhinelander 26745299ed Add timer cancellation & timer tests
Updates `add_timer` to return a new opaque TimerID object that can later
be passed to `cancel_timer` to cancel an existing timer.

Also adds timer tests, which was omitted (except for one in the tagged
threads section), along with a new test for timer deletion.
2021-05-20 22:05:58 -03:00

32 lines
580 B
CMake

add_subdirectory(Catch2)
set(LMQ_TEST_SRC
main.cpp
test_address.cpp
test_batch.cpp
test_bt.cpp
test_connect.cpp
test_commands.cpp
test_encoding.cpp
test_failures.cpp
test_inject.cpp
test_requests.cpp
test_tagged_threads.cpp
test_timer.cpp
)
add_executable(tests ${LMQ_TEST_SRC})
find_package(Threads)
target_link_libraries(tests Catch2::Catch2 oxenmq Threads::Threads)
set_target_properties(tests PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
CXX_EXTENSIONS OFF
)
add_custom_target(check COMMAND tests)