diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2024-07-24 10:44:13 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2024-07-24 10:44:13 +0200 |
| commit | 3f5499cebc06356ed99159be3fb9676292cf7b8b (patch) | |
| tree | 63d36c3cd33de5746b8e3a29922e6ab7a6578def /core/CMakeLists.txt | |
| parent | 0d61f98434b95c754f46c918af5152eda82077cb (diff) | |
| download | turns-3f5499cebc06356ed99159be3fb9676292cf7b8b.tar.xz turns-3f5499cebc06356ed99159be3fb9676292cf7b8b.zip | |
turns: rename domain to core
Diffstat (limited to 'core/CMakeLists.txt')
| -rw-r--r-- | core/CMakeLists.txt | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt new file mode 100644 index 0000000..785421c --- /dev/null +++ b/core/CMakeLists.txt @@ -0,0 +1,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")
\ No newline at end of file |
