summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/CMakeLists.txt
diff options
context:
space:
mode:
authorOrkun Tokdemir <orkun.tokdemir@qt.io>2023-11-21 10:46:30 +0100
committerOrkun Tokdemir <orkun.tokdemir@qt.io>2024-05-07 21:12:29 +0200
commit545b84b93c0b84a08c037e7b70deec3400d1f827 (patch)
tree0d3deef864f3df8294822f82d9e66106329695ec /tests/auto/cmake/CMakeLists.txt
parent0678a8a00da586e78d464608e83e89b4df589485 (diff)
CMake: Add `qt_add_ui` API
This commit introduces a new `qt_add_ui` CMake API to be used instead of AUTOUIC, due to several hard-to-fix bugs it has. * Resolves the issue where Ninja required two passes to correctly build `.ui` files. * Avoids build folder leakage, in contrast to `AUTOUIC` * Prevents unnecessary recompilation of unchanged source files when a `.ui` file is modified with Ninja. * Since `qt_add_ui` does not scan source files, it provides a faster build than `AUTOUIC`. These changes aim to streamline the build process and improve efficiency when working with `.ui` files. This addresses the following issues: https://gitlab.kitware.com/cmake/cmake/-/issues/16776 https://gitlab.kitware.com/cmake/cmake/-/issues/25436 https://gitlab.kitware.com/cmake/cmake/-/issues/25195 Task-number: QTBUG-110369 Fixes: QTBUG-114563 Change-Id: I34cd3df70542becf6e08502f0cbcd1c11eeeadd6 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tests/auto/cmake/CMakeLists.txt')
-rw-r--r--tests/auto/cmake/CMakeLists.txt36
1 files changed, 36 insertions, 0 deletions
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index 3331ad260d..b159de7c9c 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -399,8 +399,44 @@ endif()
_qt_internal_test_expect_pass(test_config_expressions)
_qt_internal_test_expect_pass(test_QTP0003)
+
if(NOT NO_GUI)
_qt_internal_test_expect_pass(test_collecting_plugins)
endif()
_qt_internal_test_expect_pass(test_qt_manual_moc)
+
+# check if the os is opensuse. If it is, we need to skip tests due to CI problems
+set(is_opensuse FALSE)
+if(UNIX)
+ if(EXISTS "/etc/os-release")
+ file(STRINGS "/etc/os-release" os_release_content)
+ foreach(line IN LISTS os_release_content)
+ if(line MATCHES "openSUSE" OR line MATCHES "opensuse")
+ set(is_opensuse TRUE)
+ break()
+ endif()
+ endforeach()
+ endif()
+endif()
+
+if(NOT QNX AND NOT WASM AND NOT (WIN32 AND QT_BUILD_MINIMAL_STATIC_TESTS)
+ AND NOT is_opensuse)
+ # Since our CI machines are slow, ctest --build-and-test buffers the output
+ # of the configure step of a test, and the fact that we run all the test
+ # logic in the configure step, we need to divide the tests into smaller
+ # chunks to avoid CI stdout timeout errors.
+ # See https://gitlab.kitware.com/cmake/cmake/-/issues/25790
+ _qt_internal_test_expect_pass(test_qt_add_ui_common)
+ _qt_internal_test_expect_pass(test_qt_add_ui_1)
+ _qt_internal_test_expect_pass(test_qt_add_ui_2)
+ _qt_internal_test_expect_pass(test_qt_add_ui_3)
+ _qt_internal_test_expect_pass(test_qt_add_ui_4)
+ _qt_internal_test_expect_pass(test_qt_add_ui_5)
+ _qt_internal_test_expect_pass(test_qt_add_ui_6)
+ _qt_internal_test_expect_pass(test_qt_add_ui_7)
+ _qt_internal_test_expect_pass(test_qt_add_ui_8)
+ _qt_internal_test_expect_pass(test_qt_add_ui_9)
+ _qt_internal_test_expect_pass(test_qt_add_ui_10)
+endif()
+