Boost logo

Boost-Build :

Subject: Re: [Boost-build] Errors when using target references to boost libraries
From: Michael Caisse (boost_at_[hidden])
Date: 2009-09-04 14:52:22


Bob Walters wrote:
> Johan Nilsson wrote:
>
>>> My goal is that using those targets avoids any
>>> need to try to
>>>
>> Try to ... what?
>>
>
> Sorry: Another victim of loss-of-focus. I'm trying to avoid putting
> any specific library
> names in the Jamfile in order to keep it OS/variant/architecture neutral.
>
> I've tried the approach you suggested, on windows. I'm still getting
> an odd problem - apparently
> with finding the aliases. (filesystem was the first alias in the
> library list when I ran this bjam):
>

Somebody was trying to do this same thing on IRC this week. I've not thought
of trying to do something like that with aliases so I can't tell you the exact
reason it doesn't work for you.... however, I can tell you what does work and
what I think is the "recommended" (though I'm not sure why I think that (o; )
way of doing this.

In your Jamroot do something like this:

------ Jamroot -------

...

use-project /vendor/boost : d:/boost/boost_1_38_0 ;

...

-----------------------

In your Jamfile, just refer to the boost library you want and bingo! It does
the right thing.

------ Jamfile -------

exe attribute_test
        : ../test/attribute_test.cpp
          omdxml
          /vendor/boost//headers
          /vendor/boost//thread
        ;

-----------------------

Hope this helps. The use-project in Jamroot creates a very powerful tool.

Michael

-- 
----------------------------------
Michael Caisse
Object Modeling Designs
www.objectmodelingdesigns.com

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