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

CMake moc rule is not incremental anymore

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P2: Important
    • Resolution: Unresolved
    • Affects Version/s: 5.2.1
    • Fix Version/s: None
    • Component/s: Build System
    • Labels:

      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

            • Assignee:
              krf Kevin Funk
              Reporter:
              dendy Daniel Levin
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:

                Gerrit Reviews

                There are no open Gerrit changes