summaryrefslogtreecommitdiff
path: root/domain/CMakeLists.txt
blob: 5e4201ce17070d4f168a358669331c25083072c4 (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
# Library

add_library("domain"
  "src/participant.cpp"
)

add_library("turns::domain" ALIAS "domain")


target_compile_options("domain" 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("domain" PUBLIC
  "include"
)

target_link_libraries("domain" PUBLIC
  "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:gcov>"

  "PkgConfig::glibmm"
)

target_link_options("domain" PRIVATE
  "$<$<AND:$<CXX_COMPILER_ID:GNU,Clang>,$<CONFIG:Debug>>:--coverage>"
)

# Tests

add_executable("domain-tests"
  "tests/participant.cpp"
)

target_link_libraries("domain-tests"
  "Catch2::Catch2WithMain"

  "turns::domain"
)

catch_discover_tests("domain-tests")