[cmake-developers] automoc: Use a pre-build event in VS >= 7

Stephen Kelly steveire at gmail.com
Tue Apr 2 05:25:55 EDT 2013

Brad King wrote:

> Alex, Steve,
> I just made this automoc change:
>  http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=20c99b1d
> in response to discussion here:
>  http://www.cmake.org/Bug/view.php?id=13900#c32710
> In addition to working around a VS 2012 bug, it also makes projects
> look nicer in the VS IDE by not loading *_automoc targets.  Instead
> it uses PRE_BUILD events in the respective original targets.  IIUC
> VS runs these events when starting a target if and only iff any of
> the rules in the target are out of date.  Therefore when headers
> or sources change that require any re-compilation in a target it
> will be re-automoc-ed again.

I didn't try it out, and I don't really know anything about the windows 
generators or PRE_BUILD commands to comment about those aspect. If it works, 
I'm happy though.



More information about the cmake-developers mailing list