-
Suggestion
-
Resolution: Won't Do
-
P3: Somewhat important
-
None
-
6.8
-
None
From Qt5 times we inherited CMake tests like the following in qtdeclarative/tests/auto/cmake/CMakeLists.txt:
set(module_includes "")
if(TARGET Qt::Qml)
list(APPEND module_includes
Qml QQmlEngine
)
endif()
# ...
_qt_internal_test_module_includes(${module_includes})
This tests whether
- find_package(Qt6Qml 6.0.0 REQUIRED) is successful
- the Qt6Qml_VERSION variable and its MAJOR, MINOR, PATCH variants exist
- a test program linking against Qt6Qml can include <QtQml/QQmlEngine>
- said test program can instantiate a QQmlEngine object
All this is worth testing in a world where Qt is built with qmake and the creation of CMake support files relies on a correct setup of qmake project files per Qt module.
In Qt6, where Qt is built with CMake, this is essentially testing qt_internal_add_module and the underlying bits like
- syncqt creating the right forwarding headers
- CMake creating valid config packages per module
- the config packages containing the package version variables
I claim that this kind of test is not needed anymore, since this is covered by building dependent modules and examples with CMake. Therefore I suggest to remove these module include tests in every repository.