CMake automoc fails to notice Q_OBJECT added after build - when using ninja.
When building a project, and then adding Q_OBJECT
to an existing header, the developer expects moc to run on that header.
This works when using make
, but not when using ninja
.
This testcase has full instructions to reproduce the bug (on Unix):
automoc_ninja.zip
Run ./run_test.sh
to set up compilation with both make
and ninja
in two separate build dirs.
I am using cmake version 3.19.2-g4a607482-dirty, i.e. git release
branch as of today.
Qt 5.15.3, self-built too.