diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2025-06-11 20:10:16 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2025-06-11 20:10:16 +0200 |
| commit | 0fbf87e7777bb37ab4e3624a4ed8e35d14ba9840 (patch) | |
| tree | 55d26b0855f32a51b2921c84d480598df1802344 | |
| parent | 85b1b7b36b1aa8c7acadef5d74708ce4a3a79ef3 (diff) | |
| download | turns-0fbf87e7777bb37ab4e3624a4ed8e35d14ba9840.tar.xz turns-0fbf87e7777bb37ab4e3624a4ed8e35d14ba9840.zip | |
gui: allow for disablement of tests
| -rw-r--r-- | gui/CMakeLists.txt | 40 |
1 files changed, 22 insertions, 18 deletions
diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 7e3edf7..39efaf4 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -1,6 +1,8 @@ # SPDX-FileCopyrightText: 2025 Felix Morgner <felix.morgner@gmail.com> # SPDX-License-Identifier: LGPL-2.1-only +option(TURNS_ENABLE_GUI_TESTS "Enable building and execution of the GUI tests" ON) + find_package("Gettext" REQUIRED) # Resources @@ -156,25 +158,27 @@ install(TARGETS "gui") # Tests -add_executable("gui-tests" - "tests/main.cpp" - "tests/messages.cpp" - "tests/participant_editor.cpp" - "tests/participant_row.cpp" - "tests/resources.cpp" -) +if(TURNS_ENABLE_GUI_TESTS) + add_executable("gui-tests" + "tests/main.cpp" + "tests/messages.cpp" + "tests/participant_editor.cpp" + "tests/participant_row.cpp" + "tests/resources.cpp" + ) -target_link_libraries("gui-tests" PRIVATE - "gui_impl" - "Catch2::Catch2" + target_link_libraries("gui-tests" PRIVATE + "gui_impl" + "Catch2::Catch2" - "$<$<CXX_COMPILER_ID:GNU,Clang>:-Wl,--whole-archive>" - "resources" - "$<$<CXX_COMPILER_ID:GNU,Clang>:-Wl,--no-whole-archive>" -) + "$<$<CXX_COMPILER_ID:GNU,Clang>:-Wl,--whole-archive>" + "resources" + "$<$<CXX_COMPILER_ID:GNU,Clang>:-Wl,--no-whole-archive>" + ) -target_compile_definitions("resources" PUBLIC - "TESTLOCALEDIR=\"${CMAKE_CURRENT_BINARY_DIR}/locale\"" -) + target_compile_definitions("resources" PUBLIC + "TESTLOCALEDIR=\"${CMAKE_CURRENT_BINARY_DIR}/locale\"" + ) -catch_discover_tests("gui-tests")
\ No newline at end of file + catch_discover_tests("gui-tests") +endif()
\ No newline at end of file |
