Boost logo

Boost-Build :

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2004-10-20 14:45:07


Toon Knapen wrote:
> Vladimir Prus wrote:
>
>>On Wednesday 20 October 2004 16:56, Toon Knapen wrote:
>>
>>
>>>I would like that the user can specify the path (to the boost
>>>installation for instance) in his user-config.jam. The only way to
>>>propagate these 'usage-requirements' however from my user-config.jam to
>>>my project's Jamfile is using a dummy library:
>>>...
>>>I'm sure there is a much more intelligent way ...
>>
>>
>>I'm afraid not. I though that it's good to have some "global project" and
>>inherit properties from it, but it never got implemented.
>

playing around some more with bjam and reading your documentation
(again) I came up with following solution. I just want to make sure that
this is intended behaviour (and thus to make sure that this 'trick' will
keep working in the future)

<user-config.jam>
import project ;
project.initialize $(__name__) ;
project user-config ;

alias mpiheaders
: # sources
: # requirements
: # default-build
: <include>/usr/local/mpich-1.2.5.2/include
;
</user-config.jam>

<Jamfile>
lib libfoo : mpi.cpp /user-config//mpiheaders ;
</Jamfile>

So basically I just defined an alias target with usage-requirements to
propagate them to the libraries that need those include-directories.

What I am not sure about is that the documentation of the alias rule
does not talk about usage-requirements but I just thought it would be
similar to the other rules. If you can confirm this it would be nice to
complete the documentation. I can do that if you want (and you tell me
where exactly) ?

 


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