1
0
mirror of https://github.com/wqking/eventpp.git synced 2024-12-27 00:17:02 +08:00
eventpp/tests/unittest/CMakeLists.txt

51 lines
1.2 KiB
CMake
Raw Permalink Normal View History

2018-08-05 12:46:36 +08:00
set(TARGET_TEST unittest)
set(SRC_TEST
testmain.cpp
test_callbacklist_basic.cpp
test_callbacklist_ctors.cpp
test_callbacklist_multithread.cpp
test_dispatcher_basic.cpp
test_dispatcher_ctors.cpp
test_dispatcher_multithread.cpp
test_queue_basic.cpp
2020-05-25 21:59:20 +08:00
test_queue_ctors.cpp
2018-08-05 12:46:36 +08:00
test_queue_multithread.cpp
test_queue_ordered_list.cpp
2019-03-28 15:32:24 +08:00
test_hetercallbacklist_basic.cpp
2020-04-18 21:23:39 +08:00
test_hetercallbacklist_ctors.cpp
2018-12-08 08:49:55 +08:00
test_heterdispatcher_basic.cpp
2020-04-19 21:18:27 +08:00
test_heterdispatcher_ctors.cpp
test_heterdispatcher_multithread.cpp
test_heterqueue_basic.cpp
2018-08-05 12:46:36 +08:00
test_eventutil.cpp
2020-01-22 16:55:25 +08:00
test_eventmaker.cpp
2018-08-05 12:46:36 +08:00
test_conditionalremover.cpp
test_counterremover.cpp
test_scopedremover.cpp
2020-12-11 09:45:23 +08:00
test_no_extra_copy_move.cpp
2021-01-19 15:15:27 +08:00
test_argumentadapter.cpp
test_conditionalfunctor.cpp
2021-01-30 19:17:49 +08:00
test_anyid.cpp
2023-04-30 08:23:54 +08:00
test_anydata.cpp
2018-08-05 12:46:36 +08:00
)
add_executable(
${TARGET_TEST}
${SRC_TEST}
)
set(THREADS_PREFER_PTHREAD_FLAG ON)
find_package(Threads REQUIRED)
target_link_libraries(${TARGET_TEST} Threads::Threads)
2021-01-29 21:32:57 +08:00
set_target_properties(${TARGET_TEST} PROPERTIES CXX_STANDARD 17)
2020-04-15 21:01:31 +08:00
if(CMAKE_COMPILER_IS_GNUCXX)
if(coverage)
set(CMAKE_CXX_FLAGS "-g -O0 -Wall -fprofile-arcs -ftest-coverage")
endif()
endif()
add_test(NAME ${TARGET_TEST} COMMAND ${TARGET_TEST})