[cmake-developers] CMAKE_AUTOMOC, system include dirs and target include directories

Alexander Neundorf neundorf at kde.org
Mon Mar 18 16:30:23 EDT 2013


On Monday 18 March 2013, Stephen Kelly wrote:
> Stephen Kelly wrote:
> > I recommend changing AUTOMOC to do the same appending. At some point, it
> > seems that was done
> 
> http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/5293/focus
> =5297
> 
> > but a followup branch probably changed that to the current state.
> 
> I've pushed the automoc-append-implicit-dirs branch to implement this. Alex
> could you review?


...lot of stuff happened over the weekend.

The comment to your commit is not really correct.

"The commit d2536579 (Automoc: fix regression #13667, broken build in
phonon, 2012-11-19) changed Automoc to try to re-add the Qt header dir
if it was stripped out as an implicit include from the moc command
line."

This commit more or less doesn't matter, since the following commit acc22400 
basically completey reverts it, i.e. it does not "go further", but does 
something differently:

"The follow-up commit acc22400 (Automoc: get include dirs without
 stripping implicit include dirs off, 2012-12-07) went further by not
 removing the implicit include dirs, if they were specified specifically
 by the user."

Some patch before simply added all of the implicit include dirs for moc, but 
moc cannot handle that, it errors out on some files then.


The patch seems to be ok. Instead of stripping these include dirs completely 
off, they are now appended at the very end of the list of include dirs.
This should give almost the same behaviour as the compiler.

So, yes, it should be fine.

The order of include dirs when set via tll() is now probably the same as the 
order of the targets in tll() ?
May we run into other situations where this can cause problems ?

Alex



More information about the cmake-developers mailing list