summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/cmake/CMakeLists.txt18
-rw-r--r--tests/auto/cmake/test_build_simple_widget_app/test_build_simple_widget_app.pro5
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