Shorter build times

Alexander Neundorf neundorf at kde.org
Sun Apr 29 03:56:06 BST 2007


On Saturday 28 April 2007 14:38, David Faure wrote:
> On Sunday 22 April 2007, Peter Kümmel wrote:
> > David Faure wrote:
> > > On Thursday 29 March 2007, Peter Kümmel wrote:
> > >> David Faure wrote:
> > >>> On Wednesday 28 March 2007, Peter Kümmel wrote:
> > >>>> The idea of attached patch is to manually exclude some files from
> > >>>> the generated all-in-one file.
> > >>>
> > >>> Good idea.
> > >>
> > >> Thanks ;)
> > >>
> > >>> But why are the touched files compiled together? IMHO this isn't a
> > >>> good idea, it will make developers forget some #include statements.
> > >>
> > >> You mean developers will forget to comment out the includes in the
> > >> _const file?
> > >
> > > No, no. I mean that developers will write new code in a.cpp and b.cpp,
> > > and they won't notice that b.cpp should include <foo.h>, because it
> > > compiles for them, with a.cpp already including <foo.h> (and
> > > allinone_nonconst includes a.cpp+b.cpp). After they commit, compilation
> > > is broken for everyone else.
> >
> > Attached a patch which prevents this. It's still several times faster.
>
> Great, thanks.
>
> > For each cpp file a file is created where the compiling could be
> > suppressed with a macro, for instance:
> >
> > // autogenerated file
> > // clear it to build it again by cmake
> > // look for non-const files
> > #define DONT_INCLUDE_CONST_FILES
> > #include "C:/sandbox/kde/b/kdecore/_all_kdecore_final_cpp.cpp"
> >
> > #ifndef kconfigbackend___ASSUME_CONST
> > #include "C:/sandbox/kde/kdelibs/kdecore/config/kconfigbackend.cpp"
> > #endif
>
> So how do I tell the system that kconfigbackend.cpp is not const, i.e. has
> been modified? I forgot again how it's supposed to work exactly, and
> neither the patch nor the generated file has much documentation... 

Basically that's my problem with this feature.
It's not even done yet and you (and I too) already forgot how it is exactly 
supposed to work.
And this is "only" for some additional compile time optimization. Not sure 
about all the dependencies to generated files etc.
I'm against applying this patch.

Bye
Alex




More information about the kde-core-devel mailing list