Shorter build times

David Faure faure at kde.org
Sat Apr 28 19:38:00 BST 2007


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... Can you add docu to the generated file (which will therefore
appear in the patch) to explain what people are supposed to do to benefit from this feature?

-- 
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-core-devel mailing list