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

CMake moc rule is not incremental anymore

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 5.2.1
    • Build System: CMake
    • None

    Description

      Starting with Qt 5.1 CMake command to generate moc files does not produce incremental build rule. This violates fundamental CMake principle to generate incremental build system without explicit cmake invocation or redundant build clean. When appropriate project definitions or include dirs changing - moc file is not regenerated as expected. Only _parameters file updated.

      Bug is in macro QT5_CREATE_MOC_COMMAND, when final add_custom_command() call has only ${infile} as dependency AND removed command line arguments. Arguments now is in ${_moc_parameters_file}, thus CMake rule cache cannot track argument changes anymore.

      Fix: ${_moc_parameters_file} need to be a dependency of ${outfile}.

      Attachments

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

        Activity

          People

            krf Kevin Funk
            dendy Daniel Levin
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes