CMake: Make baseline tests standalone projects

Just as was done earlier with the autotests (in commit
8450ab8dec83f075ee028f35b3035c9478fa13ce), add the boilerplate
standalone test prelude to each baseline test, so that they can be
opened with an IDE without the qt-cmake-standalone-test script, but
directly with qt-cmake or cmake.

Boilerplate was added using the following scripts:
https://git.qt.io/alcroito/cmake_refactor

Pick-to: 6.8
Change-Id: Iaf3d490211c5f3404bcc31f4dd0a6c02821f4232
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Eirik Aavitsland 2024-07-02 11:54:28 +02:00
parent 27a3229626
commit 5d1ded3359
4 changed files with 24 additions and 0 deletions

View File

@ -11,6 +11,12 @@ file(GLOB_RECURSE test_data_glob
scripts/*)
list(APPEND test_data ${test_data_glob})
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_baseline_painting LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_baseline_painting
SOURCES
../shared/baselineprotocol.cpp ../shared/baselineprotocol.h ../shared/lookup3.cpp

View File

@ -6,6 +6,12 @@ file(GLOB_RECURSE test_data_glob
qss/*)
list(APPEND test_data ${test_data_glob})
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_baseline_stylesheet LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_baseline_stylesheet
SOURCES
../shared/baselineprotocol.cpp ../shared/baselineprotocol.h ../shared/lookup3.cpp

View File

@ -3,6 +3,12 @@
list(APPEND test_data "./data")
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_baseline_text LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_baseline_text
SOURCES
../shared/baselineprotocol.cpp ../shared/baselineprotocol.h ../shared/lookup3.cpp

View File

@ -1,6 +1,12 @@
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
if(NOT QT_BUILD_STANDALONE_TESTS AND NOT QT_BUILDING_QT)
cmake_minimum_required(VERSION 3.16)
project(tst_baseline_widgets LANGUAGES CXX)
find_package(Qt6BuildInternals REQUIRED COMPONENTS STANDALONE_TEST)
endif()
qt_internal_add_test(tst_baseline_widgets
SOURCES
../shared/baselineprotocol.cpp ../shared/baselineprotocol.h ../shared/lookup3.cpp