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.

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>
(cherry picked from commit 9e3e167223d2d16b4b0dac0be72ce212e47665b4)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Alexandru Croitor 2022-08-15 13:15:30 +02:00 committed by Qt Cherry-pick Bot
parent 75b3f7ef55
commit e6eaa053f5
2 changed files with 23 additions and 0 deletions

View File

@ -111,6 +111,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