CMake dependency scanning for .moc files

David Faure faure at kde.org
Thu Apr 17 11:48:09 CEST 2008


On Thursday 17 April 2008, Matthias Kretz wrote:
> On Wednesday 16 April 2008, Alexander Neundorf wrote:
> > On Wednesday 16 April 2008, Matthias Kretz wrote:
> > > On Wednesday 16 April 2008, Alexander Neundorf wrote:
> > > > On Wednesday 16 April 2008, Andreas Pakulat wrote:
> > > > > On 15.04.08 19:19:45, Alexander Neundorf wrote:
> > > > > > On Monday 14 April 2008, Andreas Pakulat wrote:
> > > > > > > b) removing a .moc file from the builddir doesn't produce a
> > > > > > > re-moc, cmake just tells gcc to compile the non-existing
> > > > > > > .moc-file.
> 
> The dependecy to run kde4automoc is on all source files, all the associated 
> header files (e.g. s/\.cpp$/.h/), the kde4automoc binary and the 
> <target>_automoc.files file. If <target>_automoc.cpp is more recent than all 
> those deps, deleting a moc file will not run kde4automoc and therefore not 
> regenerate the moc file. I see only one way to fix that: run kde4automoc 
> unconditionally for all targets. (Sidenode: then on make && make install 
> you'd see kde4automoc getting called for all targets on install again. And as 
> that would touch the <target>_automoc.cpp file all targets would link again.)

I don't think this is worth it. If I wanted a .moc file to be regenerated I would just
touch the corresponding .h file... No need to bloat the build system for this IMHO.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).


More information about the Kde-buildsystem mailing list