diff options
Diffstat (limited to 'domain/CMakeLists.txt')
| -rw-r--r-- | domain/CMakeLists.txt | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/domain/CMakeLists.txt b/domain/CMakeLists.txt new file mode 100644 index 0000000..5e4201c --- /dev/null +++ b/domain/CMakeLists.txt @@ -0,0 +1,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")
\ No newline at end of file |
