Shorter build times

Peter Kümmel syntheticpp at gmx.net
Thu Mar 29 20:23:20 BST 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.
>>
> 
> Yes, indeed, the problem is already known by precompiled headers.
> But I don't know a other solution than to compile without precompiled
> headers/each file separate, or to watch the commit list ;)
> 
> But you are right, to prevent this it would be perfect to
> have the files not in one big _touched file. Have to think
> about it.

Finished thinking ;)

It is possible to generate for each .cpp file a _touched file
which only includes the cpp file and which are all added
to the build process. The including is still managed by macros.

Peter




More information about the kde-core-devel mailing list