mirror of
https://github.com/oxen-io/oxen-mq.git
synced 2023-12-13 21:00:31 +01:00
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.
32 lines
580 B
CMake
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)
|