Boost logo

Boost Users :

Subject: Re: [Boost-users] Possible to put path to boost library somewhere else than Jamroot file?
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-07-09 07:37:01


s seelenluft wrote:

>>
>> > exe myname
>> > : myname.cpp
>> > : <include>.
>> > :<include>/usr/local/include/boost-1_39/
>> > ;
>>
> On Wed, Jul 8, 2009 at 11:23 AM, McLemon, Sean <Sean.McLemon_at_[hidden]>wrote:
>
>> Try putting a space between the colon and "<include>/usr/local/...".
>>
> Sorry, that was a typo in my message here. In the Jamroot file, there was a
> space.
>
> On Wed, Jul 8, 2009 at 3:14 PM, Vladimir Prus <vladimir_at_[hidden]>wrote:
>
>> I don't think this is right. Per:
>>
>>
>> http://www.boost.org/boost-build2/doc/html/bbv2/advanced/targets.html
>>
>> the syntax is:
>>
>> rule-name (
>> main-target-name :
>> sources + :
>> requirements * :
>> default-build * :
>> usage-requirements * )
>>
>> So you should have:
>>
>> exe myname
>> : myname.cpp
>> : <include>.
>> <include>/usr/local/include/boost-1_39/
>> ;
>>
> You might very well be correct in this but it works fine with and without
> the colon (some leniency in bjam, I assume).
>
>
>> You need to use project requirements in user-config.jam, see:
>>
>>
>> http://www.boost.org/boost-build2/doc/html/bbv2/advanced/projects.html
>>
>> For example:
>>
>> project user-config : requirements <include>/usr/local/include/boost-1_39
>> ;
>
>
> Maybe we are talking about different user-config.jam files. I have put the
> entry 'using darwin ;' into the user-config.jam file sitting in
> /usr/share/boost-build as it is a project-independent settings (as would be
> the location of the libraries). I would not want to put any project-specific
> settings in this file.

In that case, you can also put file named project-config.jam in the root of your
project and *do not* add it to any version control.

> But without fully understanding it, I put your
> above-mentioned line into the user-config.jam file, it does not work (it
> complains about not finding the boost library, or more specifically the
> specific file I included in the header of my .cpp file). Trying out:
> project myprojectname : requirements <include>/usr/local/include/boost-1_39
> ;
> also does not work.

This is fairly strange -- this functionality is available for years. Please
pass --debug-configuration and note which user-config.jam is being loaded --
maybe you have one in home.

- Volodya


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net