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

CMake Xcode generator wrongly notes that some qt custom targets will always rerun

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.8.0
    • Build System: CMake

    Description

      When building a qml example using Xcode, there are multiple messages like the following:

      note: Run script build phase 'Generate CMakeFiles/coffeemachine_qmlimportscan' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'coffeemachine_qmlimportscan' from project 'coffee')
      
      note: Run script build phase 'Generate CMakeFiles/coffeemachine_automoc_json_extraction' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked.
      

      These confuse you to hink that import scanning and json extraction will always be rerun, even in a null re-build after everything is built.

      That's not really the case though.
      While the custom target's command will technically be rerun it will do nothing.
      We don't define any custom target commands, but rather use the custom target to drive a custom command with depfiles.

      CMake currently doesn't have a way to tell Xcode that the custom target should not be rerun, that it's fully dependency based.

      Upstream cmake issue https://gitlab.kitware.com/cmake/cmake/-/issues/26419#note_1588309

      Attachments

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

        Activity

          People

            qtbuildsystem Qt Build System Team
            alexandru.croitor Alexandru Croitor
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes