[cmake-developers] ADDITIONAL_MAKE_CLEAN_FILES only works in Makefile generators / automoc cleaning problem
Alexander Neundorf
neundorf at kde.org
Mon May 6 15:57:54 EDT 2013
On Monday 06 May 2013, Brad King wrote:
> On 05/02/2013 05:54 PM, Alexander Neundorf wrote:
> > I updated the branch on stage.
> > The moc file is now added as source to the automoc target.
> > There is now:
> > * the normal target depends on the automoc target
> > * the moc cpp file is a source file of both the normal and the automoc
> > target
>
> Okay, so by adding the custom command to produce the file it ends
> up in the normal target as an output of a custom command so VS will
> clean it. That rule will never actually run during the build though
> because the automoc target will bring it up to date first. Even the
> newer PRE_BUILD approach on the normal target will bring it up to
> date first and the presence of the custom command will merely be
> useful for cleaning.
>
> This is good except
Ok :-)
> that the code path you modified is not even
> executed for VS anymore. You'll have to generalize the addition of
> the custom command to work in both code paths.
I'll do that.
Thanks
Alex
More information about the cmake-developers
mailing list