Don't AUTOMOC qt4-generated files
Suppress AUTOMOC on files generated by Qt4 wrapping macros; particularly, those generated by qt4_wrap_cpp
, qt4_wrap_ui
, and qt4_add_resources
. None of these should need AUTOMOC treatment, and this suppresses a CMP0071 that is really silly for these.
@brad.king, the release note text could probably use some polishing; help appreciated!
I don't have a trivial test case for this, but it should be easy enough to reproduce:
git clone https://github.com/kitware/qtextensions
cd qtextensions
cmake -DBUILD_TESTING=ON .
(It's not necessary to actually build the project, and as long as qmake
is found, it should configure without needing to set up anything else. A trivial test case would require Qt4 qmake
anyway, so the only overhead is cloning the repository. Warnings can be see without BUILD_TESTING
, but qt4_add_resources
is only exercised if BUILD_TESTING
is ON
.)