2022-07-05 11:26:52 +00:00
|
|
|
# Copyright (C) 2022 The Qt Company Ltd.
|
2022-08-19 13:21:34 +00:00
|
|
|
# SPDX-License-Identifier: BSD-3-Clause
|
2022-07-05 11:26:52 +00:00
|
|
|
|
2018-11-07 14:20:47 +00:00
|
|
|
# Order by dependency [*], then alphabetic. [*] If bugs in part A of
|
|
|
|
# our source would break tests of part B, then test A before B.
|
2018-10-24 13:20:27 +00:00
|
|
|
|
2023-08-11 18:10:48 +00:00
|
|
|
set(run_dbus_tests OFF)
|
|
|
|
if (QT_FEATURE_dbus)
|
|
|
|
set(run_dbus_tests ON)
|
|
|
|
if(NOT CMAKE_CROSSCOMPILING AND TARGET Qt::DBus)
|
|
|
|
execute_process(COMMAND dbus-send --session --type=signal / local.AutotestCheck.Hello
|
|
|
|
TIMEOUT 5
|
|
|
|
RESULT_VARIABLE dbus_session_test
|
|
|
|
OUTPUT_QUIET ERROR_QUIET)
|
|
|
|
if(NOT "${dbus_session_test}" STREQUAL "0")
|
|
|
|
set(run_dbus_tests OFF)
|
|
|
|
if(QT_FEATURE_dbus_linked)
|
|
|
|
message(WARNING
|
|
|
|
" QtDBus is enabled but session bus is not available for testing.\n"
|
|
|
|
" Please check the installation. Skipping QtDBus tests.")
|
|
|
|
else()
|
|
|
|
message(WARNING
|
|
|
|
" QtDBus is enabled with runtime support, but session bus is not available.\n"
|
|
|
|
" Skipping QtDBus tests.")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2021-08-19 14:19:21 +00:00
|
|
|
if(UIKIT)
|
|
|
|
# For now, only build CMake auto tests when QT_BUILD_MINIMAL_STATIC_TEST
|
|
|
|
# is a requested (which is basically what CI will build).
|
|
|
|
# The reason is that qt_internal_add_test doesn't use qt_add_executable
|
|
|
|
# at the moment, which means none of the required iOS specific finalizers
|
|
|
|
# are run.
|
|
|
|
if(QT_BUILD_MINIMAL_STATIC_TESTS)
|
|
|
|
add_subdirectory(cmake)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Build only corelib and gui tests when targeting uikit (iOS),
|
|
|
|
# because the script can't handle the SUBDIRS assignment well.
|
2018-11-07 14:20:47 +00:00
|
|
|
add_subdirectory(corelib)
|
|
|
|
if (TARGET Qt::Gui)
|
|
|
|
add_subdirectory(gui)
|
|
|
|
endif()
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2022-06-21 13:32:00 +00:00
|
|
|
# Limit set of tests to run for Android multi-ABI Qt builds.
|
|
|
|
if(QT_BUILD_MINIMAL_ANDROID_MULTI_ABI_TESTS)
|
2022-11-15 16:48:37 +00:00
|
|
|
add_subdirectory(cmake)
|
2022-06-21 13:32:00 +00:00
|
|
|
add_subdirectory(corelib/kernel/qmath)
|
|
|
|
add_subdirectory(widgets/effects/qpixmapfilter)
|
|
|
|
add_subdirectory(corelib/platform)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2022-05-11 17:20:30 +00:00
|
|
|
if(WASM)
|
2023-07-25 08:11:37 +00:00
|
|
|
add_subdirectory(corelib/serialization)
|
2023-07-05 13:50:15 +00:00
|
|
|
add_subdirectory(corelib/text)
|
2022-05-11 17:20:30 +00:00
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2018-11-07 14:20:47 +00:00
|
|
|
add_subdirectory(testlib)
|
2021-10-06 08:26:13 +00:00
|
|
|
if(NOT CMAKE_CROSSCOMPILING AND QT_FEATURE_process)
|
2018-11-07 14:20:47 +00:00
|
|
|
add_subdirectory(tools)
|
|
|
|
endif()
|
2019-04-08 15:23:57 +00:00
|
|
|
add_subdirectory(corelib)
|
2020-09-03 14:01:05 +00:00
|
|
|
if (TARGET Qt::Xml AND TARGET Qt::Sql AND TARGET Qt::Network)
|
|
|
|
add_subdirectory(cmake)
|
|
|
|
endif()
|
2021-03-15 16:03:38 +00:00
|
|
|
|
|
|
|
# Limit set of tests to run for static Qt builds.
|
|
|
|
if(QT_BUILD_MINIMAL_STATIC_TESTS)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2018-11-07 14:20:47 +00:00
|
|
|
if (TARGET Qt::Concurrent)
|
|
|
|
add_subdirectory(concurrent)
|
|
|
|
endif()
|
|
|
|
|
2023-08-11 18:10:48 +00:00
|
|
|
if(run_dbus_tests)
|
|
|
|
add_subdirectory(dbus)
|
2018-10-24 13:20:27 +00:00
|
|
|
endif()
|
2018-11-07 14:20:47 +00:00
|
|
|
|
2019-04-08 15:23:57 +00:00
|
|
|
if (TARGET Qt::Gui)
|
2018-11-02 13:27:57 +00:00
|
|
|
add_subdirectory(gui)
|
2018-10-24 13:20:27 +00:00
|
|
|
endif()
|
2020-06-05 07:24:37 +00:00
|
|
|
if (TARGET Qt::Network)
|
2019-07-24 11:03:33 +00:00
|
|
|
add_subdirectory(network)
|
2018-10-24 13:20:27 +00:00
|
|
|
endif()
|
2020-06-05 07:24:37 +00:00
|
|
|
if (TARGET Qt::OpenGL)
|
2018-11-02 13:27:57 +00:00
|
|
|
add_subdirectory(opengl)
|
2018-10-24 13:20:27 +00:00
|
|
|
endif()
|
2018-11-07 14:20:47 +00:00
|
|
|
if (TARGET Qt::PrintSupport)
|
|
|
|
add_subdirectory(printsupport)
|
|
|
|
endif()
|
2018-11-02 13:27:57 +00:00
|
|
|
if (TARGET Qt::Sql)
|
|
|
|
add_subdirectory(sql)
|
2018-10-24 13:20:27 +00:00
|
|
|
endif()
|
2018-10-30 13:23:48 +00:00
|
|
|
if (TARGET Qt::Widgets)
|
2018-11-02 13:27:57 +00:00
|
|
|
add_subdirectory(widgets)
|
2018-10-24 13:20:27 +00:00
|
|
|
endif()
|
2018-11-07 14:20:47 +00:00
|
|
|
if (TARGET Qt::Xml)
|
|
|
|
add_subdirectory(xml)
|
2018-10-24 13:20:27 +00:00
|
|
|
endif()
|
2018-11-02 13:27:57 +00:00
|
|
|
# add_subdirectory(installed_cmake) ## FIXME: Does this still make sense in this form?
|
2018-11-07 14:20:47 +00:00
|
|
|
add_subdirectory(other)
|