blob: 785421cd13226ff3a53cf5aee5f3e5909fbec202 (
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
52
53
54
55
56
57
|
set(COMPONENT "core")
# Library
add_library("${COMPONENT}"
"src/disposition.cpp"
"src/participant.cpp"
"src/turn_order.cpp"
)
add_library("turns::${COMPONENT}" ALIAS "${COMPONENT}")
target_compile_options("${COMPONENT}" 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>"
PRIVATE
"$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:-fprofile-arcs>"
"$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:-ftest-coverage>"
)
target_include_directories("${COMPONENT}" PUBLIC
"include"
)
target_link_libraries("${COMPONENT}" PUBLIC
"$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:gcov>"
"PkgConfig::giomm"
"PkgConfig::glibmm"
)
target_link_options("${COMPONENT}" PRIVATE
"$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:--coverage>"
)
# Tests
add_executable("${COMPONENT}-tests"
"tests/register_types.cpp"
"tests/disposition.cpp"
"tests/participant.cpp"
"tests/turn_order_bugs.cpp"
"tests/turn_order.cpp"
)
target_link_libraries("${COMPONENT}-tests"
"Catch2::Catch2"
"turns::core"
"turns::glib-test-main"
)
catch_discover_tests("${COMPONENT}-tests")
|