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

    • Bug
    • Resolution: Cannot Reproduce
    • Not Evaluated
    • None
    • 2.4.3
    • Build-time integration
    • None
    • Visual Studio 2019

      Both v140 and v142 build tools.
    • 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

            mecfc Miguel Costa
            accwhid accwhid
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes