Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
5.12
-
None
-
-
9d87528eb6a7eb48763d41c7bff6a532f98708cd (qt/tqtc-qtbase/5.15) 03de9a41da039f79b9a8881e9c8c476b008d4d07 (qt/tqtc-qtbase/dev)
Description
The custom command for second pass is generated with empty dependency (tested with msvc and ninja generators).
Changing the depends in Qt5CoreMacros.cmake:337 from "rcc_object_${outfilename}" to "$<TARGET_OBJECTS:rcc_object_${outfilename}>" can fix that.
According to CMake document of add_custom_command:
DEPENDS
Specify files on which the command depends. Each argument is converted to a dependency as follows:
- If the argument is the name of a target (created by the add_custom_target(), add_executable(), or add_library() command) a target-level dependency is created to make sure the target is built before any target using this custom command. Additionally, if the target is an executable or library, a file-level dependency is created to cause the custom command to re-run whenever the target is recompiled.
a file-level dependency should exist. So perhaps this is a bug in CMake generator. But we can explicitly add $<TARGET_OBJECTS:rcc_object_${outfilename}> to ensure this file-level dependency is generated.
Attachments
For Gerrit Dashboard: QTBUG-85186 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
306729,3 | CMake: Fix dependency in qt_add_big_resources | 5.15 | qt/qtbase | Status: MERGED | +2 | 0 |
306993,3 | CMake: Fix dependency in qt_add_big_resources | dev | qt/qtbase | Status: MERGED | +2 | 0 |