blob: a6ef136dae8e1ad11d6449e476eeaf7a15a62830 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
add_subdirectory(dependency)
add_library(test_base INTERFACE)
target_link_libraries(test_base INTERFACE gtest_main)
# all warnings as errors
if(MSVC)
target_compile_options(test_base INTERFACE /W4 /WX)
else(MSVC)
target_compile_options(test_base INTERFACE -Wall -Wextra -Werror)
endif(MSVC)
if(SPAWN_TEST_ADDRESS_SANITIZER)
# add address sanitizier
target_compile_options(test_base INTERFACE "-fsanitize=address")
target_link_libraries(test_base INTERFACE "-fsanitize=address")
endif()
add_executable(test_async_result test_async_result.cc)
target_link_libraries(test_async_result test_base spawn)
add_test(test_async_result test_async_result)
add_executable(test_spawn test_spawn.cc)
target_link_libraries(test_spawn test_base spawn)
add_test(test_spawn test_spawn)
add_executable(test_exception test_exception.cc)
target_link_libraries(test_exception test_base spawn)
add_test(test_exception test_exception)
|