Boost logo

Boost-Build :

From: Jurko Gospodnetić (jurko.gospodnetic_at_[hidden])
Date: 2008-05-18 17:55:06

   Hi Frank.

>> alias libASources
>> :
>> A1.cpp
>> A2.cpp
>> A3.cpp ;
>> alias libBSources
>> :
>> B1.cpp
>> B2.cpp
>> B3.cpp ;
>> lib A
>> :
>> libASources
>> : :
>> : <include>. ;
>> lib B
>> :
>> libBSources
>> : :
>> : <include>. ;
>> lib AB
>> :
>> libASources
>> libBSources
>> : :
>> : <include>. ;
> Ok, now I would reject this approach because:
> Suppose the three libraries where defined in different Jamfiles which of
> course are located in different directories. BJam will now compile all
> of the sources twice: all of them to build libAB, half of them to build
> libA, and the second half to build libB.
> I would like to specify: compile *.cpp to *.obj instead of an "alias".

   OK, granted that would happen. I am attaching two example projects
though - the first a single project version presented in the previous
post and the second a multi project version with each library defined in
its own Jamfile.

   Both examples build each source file exactly once.

   In the second version I defined all the sources and rules for
compiling them to obj files explicitly in the top level Jamroot file and
made library targets reference those .obj targets instead of their
corresponding .cpp files as sources.

   However at the moment, I must admit I do not see why Boost Build has
not been implemented so that it builds all of its projects in the same
build folder, without splitting them over separate project specific
build folders. That would make the initial example work 'the good way'
even with multiple projects.

   I am 95% certain there is a good reason for this but I just can not
see it atm. :-) Perhaps someone else can shed some more light on this...
I personally do not have the time at the moment to go tackle that issue.
If you would, please add an item to the issue tracker
( describing this problem and the
potential solution. That way it will not get lost.

> See my post "How to build project comprising of sources in different
> dirs" from May 6th.

   I will go look at it now. Been marked as a 'to do' in my news reader
but just had not had the time to go through it yet... :-)

   Hope this helps.

   Best regards,
     Jurko Gospodnetić

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at