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

Skip executing unnecessary commands when building tools during cross-compilation

    XMLWordPrintable

    Details

      Description

      Origin is comment at https://codereview.qt-project.org/c/qt/qtbase/+/298509/10/qmake/CMakeLists.txt#255

      If you look at the following failed qtremoteobjects integration
      http://testresults.qt.io/coin/integration/qt/qtremoteobjects/tasks/web_qt_qtremoteobjects_1592323040002 which was done for PS2 of https://codereview.qt-project.org/c/qt/qtremoteobjects/+/304624/2

      you can see that CMake fails to configure when building for iOS with the following messages:

      agent:2020/06/16 16:00:23 build.go:253: -- Searching for tool 'Qt6::repc' in package Qt6RemoteObjectsTools.
      agent:2020/06/16 16:00:23 build.go:253: -- Qt6::repc was found at /Users/qt/work/install/host/bin/repc using package Qt6RemoteObjectsTools.
      agent:2020/06/16 16:00:23 build.go:253: CMake Error at /Users/qt/work/install/target/lib/cmake/Qt6/QtBuild.cmake:5030 (target_sources):
      agent:2020/06/16 16:00:23 build.go:253: Cannot specify sources for target "repc" which is not built by this
      agent:2020/06/16 16:00:23 build.go:253: project.
      agent:2020/06/16 16:00:23 build.go:253: Call Stack (most recent call first):
      agent:2020/06/16 16:00:23 build.go:253: tools/repc/CMakeLists.txt:37 (qt_process_qlalr)
      

      qt_process_qlalr is one of the functions that didn't check if the target is an imported target and should do nothing, similar to qt_extend_target.

      While that is addressed in https://codereview.qt-project.org/c/qt/qtbase/+/304656
      the main issue remains that we shouldn't have to do this, and we can't do this for non qt_ prefixed functions.

      We should instead introduce a function like qt_tool_will_be_built() and teach pro2cmake to use it and exit the add_subdirectory() call early in case it isn't being built.

        Attachments

          Issue Links

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

            Activity

              People

              Assignee:
              jbornema Joerg Bornemann
              Reporter:
              alexandru.croitor Alexandru Croitor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: