Boost logo

Boost-Build :

Subject: [Boost-build] SOlVED: Re: Is it possible to remove dependencies?
From: Börje Granberg (borje.granberg_at_[hidden])
Date: 2010-04-18 15:20:29


I solved the dependency protection by writing this in my code to
prevent changes in (automatic generated) Log.h to propagate
recompilations of all files

#define LOG_H "Log.h"
#include LOG_h

//Börje

2010/4/13 Börje Granberg <borje.granberg_at_[hidden]>:
> Log.h is created though input from several source and header files in
> the project and the output is put in a single file so that is why it
> is big. But since the Log.h in recreated every time the build system
> should not rebuild every other file in the project.
> If it is impossible as you say I think I can solve it by using letting
> the log framework go though the files before gcc does, some kind of
> preprocessor so to say and become a 1-to-1 generator, but no sure how
> to do.
> From every .cc or .hh the "log compiler" can create a header file with
> some class definitions and implementation. There is a 1 to 1 relation
> between these. (CC/HH -> log.HH) Other files in the project include
> these log.HH files.
> From foo.cc there should first a foo.cc.log.hh and after that gcc
> should go in and create the object file. Since bar.cc that includes
> "foo.cc.log.hh" boost should also recompile this file.
>
>
> This question is related to http://lists.boost.org/boost-build/2010/04/23344.php
>
> Best regards
> Börje Granberg
>
>
> 2010/4/13 Konstantin Litvinenko <to.darkangel_at_[hidden]>:
>> Börje Granberg пишет:
>>>
>>> hi,
>>> The log framework in my project creates a quite big header file
>>> (Log.h) that is included in every file in the project that uses
>>> creates logs.
>>> The tool that creates this header file parses every source file and
>>> puts its output in log.h. If the log.h gets updated because foo.cc is
>>> updated I don't want bar.cc to be recompiled.
>>> The old make based build system uses a macro around the #include line
>>> so that when makedep created the dependency files, an update of Log.h
>>> does not create any dependencies at all. Note that all files that
>>> needs to be rebuild will be rebuild anyway.
>>> Does anyone know any way so solve this with boost build? Or do you
>>> have any ideas to improve the creatation of Log.h?
>>
>>  As I know it is impossible to do...
>>  Why log.h is big? I have never saw that logging can make any bloat...
>>
>> _______________________________________________
>> Unsubscribe & other changes:
>> http://lists.boost.org/mailman/listinfo.cgi/boost-build
>>
>


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk