Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-120737

Remove CMake module_includes autotests

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Won't Do
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • 6.8
    • Build System: CMake
    • None
    • All

      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.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            qtbuildsystem Qt Build System Team
            jbornema Joerg Bornemann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes