MantisBT - CMake
View Issue Details
0015254CMakeCMakepublic2014-11-17 15:112016-06-10 14:31
Jonnhy Fisher 
Kitware Robot 
normalmajoralways
closedmoved 
CMake 3.0.2 
 
0015254: AUTOMOC ignores Q_OBJECT if preceded by non-whitespace characters
A header file like

class A : public QObject
{ Q_OBJECT
};

or

class A : public QObject
{
 /* */ Q_OBJECT
};

with CMAKE_AUTOMOC will actually not run moc on that file, while

class A : public QObject
{
    Q_OBJECT;
};

will run moc. Apparently there may only be whitespace in front of Q_OBJECT to trigger automoc. This is not documented and kind of surprising.
enable AUTOMOC
put a some none-whitespace before Q_OBJECT
No tags attached.
Issue History
2014-11-17 15:11Jonnhy FisherNew Issue
2016-06-10 14:29Kitware RobotNote Added: 0042669
2016-06-10 14:29Kitware RobotStatusnew => resolved
2016-06-10 14:29Kitware RobotResolutionopen => moved
2016-06-10 14:29Kitware RobotAssigned To => Kitware Robot
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0042669)
Kitware Robot   
2016-06-10 14:29   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.