CMake: Add simple widgets qmake iOS build test

Build a simple widgets qmake project when targeting iOS in the CI.
This ensure we don't introduce basic regressions in the .pri / .prl
file generation.

Make sure to target the ios simulator, so we don't require any
code signing or provisioning profiles.

Pick-to: 6.4
Fixes: QTBUG-96058
Change-Id: I1a5564e838a5ce3cac89a37a5a4ddee74d3400f3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Alexandru Croitor 2022-08-15 13:15:30 +02:00
parent e76286fd4b
commit 9e3e167223
2 changed files with 23 additions and 0 deletions

View File

@ -114,6 +114,24 @@ include("${_Qt6CTestMacros}")
if(NOT NO_WIDGETS)
_qt_internal_test_expect_pass(test_build_simple_widget_app)
set(extra_widget_app_options "")
if(IOS)
list(APPEND extra_widget_app_options
QMAKE_OPTIONS CONFIG+=iossimulator
)
endif()
if(CMAKE_HOST_WIN32)
# Unset MAKEFLAGS environment variable when invoking build tool, it might
# have options incompatible with nmake.
list(APPEND extra_widget_app_options
BUILD_ENVIRONMENT MAKEFLAGS ""
)
endif()
_qt_internal_add_qmake_test(test_build_simple_widget_app
TESTNAME test_build_simple_widget_app_qmake
${extra_widget_app_options}
)
endif()
# We only support a limited subset of cmake tests when targeting iOS:

View File

@ -0,0 +1,5 @@
TEMPLATE = app
SOURCES += main.cpp
QT += widgets
CONFIG += app_bundle
TARGET = simple_widget_app