Details
-
Bug
-
Resolution: Out of scope
-
P2: Important
-
None
-
5.2.1
-
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}.