Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-85186

qt5_add_big_resources: second pass never reruns

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.15.1, 6.0.0
    • 5.12
    • Build System
    • None
    • All
    • 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:

      1. 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

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

        Activity

          People

            kkohne Kai Köhne
            klusting 刘 洪澎
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes