Xcode generator: automoc mocs_compilation.cpp is recompiled
macOS 11.3, Xcode 12.5, cmake 3.19.7: If I compile a project using automoc, then shutdown the computer, for exemple overnight, then reopen the project, it triggers a rebuild of mocs_compilation.cpp. This is tricky to reproduce as the rebuild does not happen right away, even if closing Xcode or rebooting. Consistently every morning, on a huge project, the mocs_compilation.cpp files will be rebuilt, taking 2-3 minutes.
Here's a sample almost empty project to toy with. Note that it is not easy to reproduce. CmakeXcodeBug.zip