Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-29481

[Reg 10.x? -> 11.0] Qt Creator forcibly wipes the build folder when switching configurations on macOS

    XMLWordPrintable

Details

    • macOS
    • 9c2527eea (11.0)

    Description

      This bug makes it very difficult to develop large projects – it causes unnecessary, time-consuming rebuilds of the whole project.

       

      Steps to reproduce

      1. Create a new "Qt Widgets Application" project template in Qt Creator. Use all wizard defaults, but pick the qmake build system.
      2. Configure it for any kit (for example, "Qt 6.5.2 for macOS" or "Qt 6.5.2 for iOS Simulator". macOS is faster than iOS)
      3. Open Qt Creator's "Compile Output" pane and monitor it for the next steps.
      4. Build the project in Debug mode.
      5. Switch the configuration to Release mode and build the project.
      6. Switch the configuration to Debug mode and build the project.
      7. Keep repeating Steps #5 and #6

       

      Expected outcomes
      Step #6 (and all subsequent switches) should be a no-op.

       

      Actual outcomes
      Step #6 (and all subsequent switches) runs `make clean` and wipes the build folder, requiring a full rebuild:

      15:30:33: Running steps for project untitled7...
      15:30:33: Starting: "/usr/bin/make" clean -j8
      rm -f moc_mainwindow.cpp
      rm -f ui_mainwindow.h
      rm -f main.o mainwindow.o moc_mainwindow.o
      rm -f *~ core *.core
      15:30:33: The process "/usr/bin/make" exited normally.
      15:30:33: Elapsed time: 00:00.
      

       

      Notes

      • CMake is not affected
      • Windows is not affected

       

      Partial workaround
      Under "Build Settings" > "Clean Steps", change the "Make arguments" from "clean" to "--version". This renders the bug mostly harmless – you just need to temporarily change it back to "clean" when you actually want to clean.

      Attachments

        Issue Links

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

          Activity

            People

              kandeler Christian Kandeler
              skoh-qt Sze Howe Koh
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes