Priority: Not Evaluated
Affects Version/s: 2.4.3
Fix Version/s: None
Environment:Visual Studio 2019
Both v140 and v142 build tools.
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.