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

Migrate various function to CMake DEFER

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • None
    • Build System: CMake
    • None

    Description

      The goal of this is to better split monolith functions like `qt6_add_qml_module` into separate components like `qt6_target_qml_sources`, `qt6_add_resources`. The idea is to delay and gather all relevant function calls, allowing for more arbitrary ordering of executions

      Example

      Consider this small example

      qt_add_qml_module(foo
          URI Foo
      )
      qt_target_qml_sources(foo
          QML_FILES
              bar.qml
      )
      set_source_files_properties(main.qml
          PROPERTIES
              QT_RESOURCE_ALIAS Main
      )
      

      This one has unexpected failure behavior the `QT_RESOURCE_ALIAS` after it was used in `qt_target_qml_sources`. Keeping track of any such interactions would be tricky for the user, so it would be ideal to remove such interactions

      Implications

      • More flexibility in the allowed order of function calls
      • Less need of forwarding arguments
      • Lower configure time because multiple calls like `qt_add_resources` are concatenated

      Functions that could be migrated

      • `qt6_target_qml_sources`
      • `qt6_add_resources`
      • ...?

      Attachments

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              lecris Cristian Le
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes