No, it isn't. I tried the examples given in the Mantis Issue tracker an the (Qt5) moc ran fine.
The examples in the moc mapage recommend Q_OBJECT on a single line though.
The limitation in CMake comes from the way the presence of a Q_OBJECT macro is detected,
which is by testing the source against this regular expression:
If an #include statement like #include "moc_<basename>.cpp" is found, the Q_OBJECT or Q_GADGET macros are expected in an otherwise empty line of the <basename>.h(xx) header file.
It does when merged because that's when the #15254 finally links up (before that, it looks at your fork's issue with that number). It links from anywhere if you reference it as cmake/cmake#15254 (there's also the group-wide cmake#15254 reference).