Skip to content
Snippets Groups Projects
Commit 4bda0337 authored by Jörg Bornemann's avatar Jörg Bornemann Committed by Alexey Edelev
Browse files

AutoGen: Fix needless compilation of mocs_compilation.cpp

For an AUTOMOC'ed target foo, when depfiles are used, there are the
following dependencies:

foo_autogen -> foo_autogen/timestamp
foo_autogen/mocs_compilation.cpp -> foo_autogen/timestamp

The first is used to trigger AUTOGEN.
The second erroneously triggers a recompilation of
mocs_compilation.cpp when any source file of target foo is touched.

Remove the latter dependency and replace it with an order-only
dependency from foo_autogen/mocs_compilation.cpp to
foo_autogen_timestamp_deps.

That is achieved by making mocs_compilation.cpp or its
per-configuration variants byproduct(s) of the timestamp file.

Fixes: #22338
parent 41e99531
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment