From 0fbf87e7777bb37ab4e3624a4ed8e35d14ba9840 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Wed, 11 Jun 2025 20:10:16 +0200 Subject: gui: allow for disablement of tests --- gui/CMakeLists.txt | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) (limited to 'gui') 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 # 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" - "$<$:-Wl,--whole-archive>" - "resources" - "$<$:-Wl,--no-whole-archive>" -) + "$<$:-Wl,--whole-archive>" + "resources" + "$<$:-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 -- cgit v1.2.3