aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/CMakeLists.txt
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2022-08-16 18:37:30 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2022-12-02 13:58:55 +0100
commit2e4fad5f1d29a6bd4547c21916bd626d59d194cf (patch)
treef3fd2309f209e50067657f913e84789efa07dd34 /tests/auto/CMakeLists.txt
parent8bc748e7e52d19a078b0281c5b8265a42015ffdb (diff)
CMake: Add iOS build auto test for Qt Quick project
Currently we can't run iOS tests in the CI, but we can at least build them. Reuse the CMake deployment auto test as a regular build test (no deployment) when targeting iOS. This ensures we don't regress in building iOS projects that use qml modules. Move the deployment test to be added earlier in the CMakeLists.txt file and return early when both IOS and QT_BUILD_MINIMAL_STATIC_TESTS are true, so that we build only that test in the CI for iOS. Pick-to: 6.4 Fixes: QTBUG-96056 Change-Id: I68002c5b70bb3f182cf55ec4a2d4888ea9e2b81e Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'tests/auto/CMakeLists.txt')
-rw-r--r--tests/auto/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
index 1f80a6e2e8..74c4ee86d6 100644
--- a/tests/auto/CMakeLists.txt
+++ b/tests/auto/CMakeLists.txt
@@ -3,6 +3,14 @@
add_subdirectory(cmake)
+# For now, only build a subset of CMake auto tests when QT_BUILD_MINIMAL_STATIC_TEST
+# is specified and the build is targeting iOS. QT_BUILD_MINIMAL_STATIC_TEST is used in our CI.
+# Regular tests shouldn't be built because the CI will try to run them and fail due to missing
+# simulator support.
+if(IOS AND QT_BUILD_MINIMAL_STATIC_TESTS)
+ return()
+endif()
+
if(TARGET Qt::Quick)
add_subdirectory(qml)
add_subdirectory(quick)