mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-20 14:58:38 -05:00
6b20bbd2dd
For Qt >= 5.15.0 and Ninja generators AutoMoc creates a depfile to let
Ninja decide when to run AutoMoc. This was introduced by commit aebfbcaa46
(AutoGen: Use depfiles for the XXX_autogen ninja targets, 2020-01-14,
v3.17.0-rc1~58^2).
However, AutoMoc was not triggered after adding a new moc-able file to
the project. This patch adds the project file (and potentially included
files) to the dependencies in the depfile.
Now, a re-run of AutoMoc is triggered if the project file changes.
Fixes: #21127
16 lines
206 B
C++
16 lines
206 B
C++
#include <qobject.h>
|
|
|
|
class AnotherObject : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
AnotherObject() {}
|
|
};
|
|
|
|
AnotherObject* createAnotherObject()
|
|
{
|
|
return new AnotherObject();
|
|
}
|
|
|
|
#include "anotherobject.moc"
|