mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
Process C++ module interface and partition units that are members of a FILE_SET of type CXX_MODULES. moc is run on such units and its generated output is compiled as a module implementation unit of the same module, as its own scanned translation unit rather than folded into mocs_compilation.cpp. Macro-less units get an empty placeholder; module units and their dependencies are tracked in the autogen depfile and as byproducts for correct incremental rebuilds. This requires Qt 6.13, whose moc supports C++ module units. With older Qt nothing can be generated for a module unit, so a meta-object macro found in one is reported as an error rather than left to fail later in the compiler or the linker. Such a unit is no longer handled as an ordinary source, which also means its moc include directives are not honored and AUTOUIC does not process it. moc rejects a meta-object macro in a module implementation unit or a private module fragment, and AUTOMOC does not work around that.
14 lines
210 B
C++
14 lines
210 B
C++
module;
|
|
#include <QObject>
|
|
export module Mod;
|
|
export import :Part;
|
|
|
|
export class PrimaryObject : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
using QObject::QObject;
|
|
signals:
|
|
void primarySignal(int value);
|
|
};
|