Skip to content

AutoMoc: Take AUTOMOC_BUILD_DIR into account in depfile

Jörg Bornemann requested to merge jobor/cmake:fix-23547 into master

For the Ninja generator and targets that have AUTOMOC_BUILD_DIR set, the AutoMoc target was always out of date.

That was because the depfile in the AutoMoc build directory was referencing the wrong timestamp file: target_autogen/timestamp: ...dependencies... instead of automoc_build_dir/timestamp: ...dependencies...

Use the full path of the timestamp file as rule name for the depfile. That full path is calculated with AUTOMOC_BUILD_DIR taken into account.

Fixes: #23547 (closed)
Topic-rename: automoc-build-dir

Edited by Brad King

Merge request reports