diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-08-15 13:15:30 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-08-17 21:21:57 +0200 |
commit | 9e3e167223d2d16b4b0dac0be72ce212e47665b4 (patch) | |
tree | 4f8c81fa5a043b4978e1a0766a8c25bca2be6529 /tests/auto/cmake | |
parent | e76286fd4b5daaff4ff6bfabc1b6c98345cb3d22 (diff) |
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>
Diffstat (limited to 'tests/auto/cmake')
-rw-r--r-- | tests/auto/cmake/CMakeLists.txt | 18 | ||||
-rw-r--r-- | tests/auto/cmake/test_build_simple_widget_app/test_build_simple_widget_app.pro | 5 |
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt index 48cd4a4719..ea14d4923a 100644 --- a/tests/auto/cmake/CMakeLists.txt +++ b/tests/auto/cmake/CMakeLists.txt @@ -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: diff --git a/tests/auto/cmake/test_build_simple_widget_app/test_build_simple_widget_app.pro b/tests/auto/cmake/test_build_simple_widget_app/test_build_simple_widget_app.pro new file mode 100644 index 0000000000..30834e2ee2 --- /dev/null +++ b/tests/auto/cmake/test_build_simple_widget_app/test_build_simple_widget_app.pro @@ -0,0 +1,5 @@ +TEMPLATE = app +SOURCES += main.cpp +QT += widgets +CONFIG += app_bundle +TARGET = simple_widget_app |