Shorter build times

Peter Kümmel syntheticpp at gmx.net
Sun Apr 22 16:19:06 BST 2007


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.
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


-- 
Peter Kümmel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: build_mereged_files.patch
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20070422/ff904088/attachment.ksh>


More information about the kde-core-devel mailing list