blob: 034c759602baf917d4ff9c6e8d9b69500b1ca022 (
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# Library
add_library("core"
"src/disposition.cpp"
"src/init.cpp"
"src/participant.cpp"
"src/turn_order.cpp"
)
add_library("turns::core" ALIAS "core")
target_compile_options("core" PUBLIC
"$<$<CXX_COMPILER_ID:GNU,Clang>:-Wall>"
"$<$<CXX_COMPILER_ID:GNU,Clang>:-Wextra>"
"$<$<CXX_COMPILER_ID:GNU,Clang>:-Werror>"
"$<$<CXX_COMPILER_ID:GNU,Clang>:-pedantic-errors>"
)
target_include_directories("core" PUBLIC
"include"
)
target_link_libraries("core" PUBLIC
"PkgConfig::giomm"
"PkgConfig::glibmm"
)
enable_coverage("core")
# Tests
add_executable("core-tests"
"tests/glib_test_init.cpp"
"tests/disposition.cpp"
"tests/participant.cpp"
"tests/turn_order_bugs.cpp"
"tests/turn_order.cpp"
)
target_link_libraries("core-tests" PRIVATE
"Catch2::Catch2WithMain"
"turns::core"
)
target_link_options("core-tests" PRIVATE
"$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:--coverage>"
)
catch_discover_tests("core-tests")
|