Regression: Since CMake 3.6.0, AUTORCC generates cpp source every time
If a target has the property AUTORCC set to true, CMake 3.6.0 and newer will rebuild the cpp source for qrc files for every build regardless of whether there are changes to the qrc file or the files that it refers to. If the target is a shared library used by many other targets in a project this leads to a lot of unneeded relinking and impacts the minimal rebuild time severely.
CMake 3.5.2 does not have this bug. CMake 3.6.0 and newer versions do and the bug is still present in the cmake.git master branch at the time of writing (sha: 25085f41 2016-11-09).
Git bisect result is commit cf679ea8:
cf679ea8dcd04c1217cd7c664117439fdd370f10 is the first bad commit commit cf679ea8dcd04c1217cd7c664117439fdd370f10 Author: Sebastian Holtermann <firstname.lastname@example.org> Date: Mon Apr 18 13:46:28 2016 +0200 Autogen: Split out moc file generation code to dedicated method
cmake-autorcc-example.zip can be used to reproduce the problem. I've reproduced the problem with the GNU Makefile and Ninja generators.