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

Running a target in a CMake based project rebuilds entire project, not just the target

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Not Evaluated
    • None
    • Qt Creator 10.0.0-beta1
    • None
    • All

    Description

      In a CMake project with multiple targets, QtC correctly identifies those targets and adds them as run configurations. But running any of them (with build before run enabled), will build the entire project, instead of only building the target that's being run.

      E.g. I would expect the behavior to be similar to

      ninja myapp && ./myapp
      
      

      But QtC currently does

      ninja && ./myapp
      

      Apparently this feature/behavior is available with qmake based projects .

      Seeing as there's no guarantee that myapp is in the list of default targets being built, running the unspecific `ninja` is not just potentially building more than what's needed, it also may result in not rebuilding myapp.

      This issue can be seen in full when importing a Qt build QT_BUILD_EXAMPLES=ON (for configuring them), but QT_BUILD_EXAMPLES_BY_DEFAULT=OFF

      Attachments

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

        Activity

          People

            cadam Cristian Adam
            vestbo Tor Arne Vestbø
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes