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

CMake errors out with recursion in latest dev when using qt-cmake-standalone-test on in-source auto test

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.8
    • Build System: CMake
    • 04a327f00 (dev), e16db6933 (6.7), fa3c1a020 (6.6), 2074c992a (tqtc/lts-6.5)

    Description

      After https://codereview.qt-project.org/c/qt/qtbase/+/518683 landed,
      trying to call qt-cmake-standalone-test on an in-source auto test (not out-of-source build) like this:

      cd qtsvg/tests/manual/examples/svgviewer
      ~/qt/builds/dev-mac/qtbase/libexec/qt-cmake-standalone-test .
      

      errors out with an endless recursion.
      Some debug annotations shows:

      
      >>> CMAKE_CURRENT_SOURCE_DIR /Volumes/T3/Dev/qt/builds/dev-mac/qtbase/lib/cmake/Qt6BuildInternals/QtStandaloneTestTemplateProject
      >> cuurrent dir /Volumes/T3/Dev/qt/builds/dev-mac/qtbase/lib/cmake/Qt6BuildInternals/QtStandaloneTestTemplateProject
         >> subdirs /Volumes/T3/Dev/qt/worktrees/dev/qtsvg/tests/manual/examples/svgviewer
      >> cuurrent dir /Volumes/T3/Dev/qt/worktrees/dev/qtsvg/tests/manual/examples/svgviewer
         >> subdirs /Volumes/T3/Dev/qt/worktrees/dev/qtsvg/tests/manual/examples/svgviewer
      >> cuurrent dir /Volumes/T3/Dev/qt/worktrees/dev/qtsvg/tests/manual/examples/svgviewer
         >> subdirs /Volumes/T3/Dev/qt/worktrees/dev/qtsvg/tests/manual/examples/svgviewer
      >> cuurrent dir /Volumes/T3/Dev/qt/worktrees/dev/qtsvg/tests/manual/examples/svgviewer
         >> subdirs /Volumes/T3/Dev/qt/worktrees/dev/qtsvg/tests/manual/examples/svgviewer
      ....
      Make Error at /Volumes/T3/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicCMakeHelpers.cmake:103 (cmake_parse_arguments):
        Maximum recursion depth of 1000 exceeded
      Call Stack (most recent call first):
        /Volumes/T3/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicCMakeHelpers.cmake:122 (_qt_internal_collect_buildsystem_targets)
        /Volumes/T3/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicCMakeHelpers.cmake:122 (_qt_internal_collect_buildsystem_targets)
        /Volumes/T3/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicCMakeHelpers.cmake:122 (_qt_internal_collect_buildsystem_targets)
        /Volumes/T3/Dev/qt/worktrees/dev/qtbase/cmake/QtPublicCMakeHelpers.cmake:122 (_qt_internal_collect_buildsystem_targets)
      ....
      

      It's some bad interaction with SUBDIRECTORIES containing the current source dir when configuring in a nested in-source subdirectory (due to how we implemented qt-cmake-standalone-test).
      One more reason to get rid of the script.

      Upstream issue: https://gitlab.kitware.com/cmake/cmake/-/issues/25489

      Attachments

        For Gerrit Dashboard: QTBUG-119998
        # Subject Branch Project Status CR V

        Activity

          People

            qtbuildsystem Qt Build System Team
            alexandru.croitor Alexandru Croitor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews