Uploaded image for project: 'Qt Visual Studio Tools'
  1. Qt Visual Studio Tools
  2. QTVSADDINBUG-774

QtMsbuild causes Qt static library's dependencies to call postBuildEvent twice

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Reported
    • Priority: Not Evaluated
    • Resolution: Unresolved
    • Affects Version/s: 2.4.3
    • Fix Version/s: None
    • Component/s: Qt/MSBuild
    • Labels:
      None
    • Environment:
      Visual Studio 2019

      Both v140 and v142 build tools.
    • Platform/s:
      Windows

      Description

      When building a project via command line using the msbuild command, building a Qt static library project causes all of it's dependencies to rebuild in a such a way the postBuildEvent is triggered twice. This issue does not occur when there is no Qt project.

      This problem is exacerbated with the /m flag, especially when projects depend on files copied in the postBuildEvent of a previous project.

      For example, a project with a non-Qt static library and a Qt static library where the Qt library depends on the non-Qt library.

      When building the order of events:

      • Non-Qt Project builds and runs postBuildEvent
      • Qt Project determines Non-Qt project needs to be built
      • Non-Qt Project determines it is up to date
      • Non-Qt Project runs postBuildEvent (second time)
      • Qt Project builds

      I've attached a sample VS2019 project that showcases the issue.

      Calling msbuild QtBugTest.sln /p:Platform=x64;Configuration=Release will build the Qt library that shows the issue.

      Calling msbuild QtBugTest.sln /p:Platform=x64;Configuration=NonQtRelease will build two normal static libraries showing this issue does not occur without Qt.

       

       

       

       

        Attachments

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

          Activity

            People

            Assignee:
            mecfc Miguel Costa
            Reporter:
            accwhid accwhid
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:

                Gerrit Reviews

                There are no open Gerrit changes