« Return to Thread: Possible to put path to boost library somewhere else than Jamroot file?

Re: Possible to put path to boost library somewhere else than Jamroot file?

by Vladimir Prus-3 :: Rate this Message:

Reply to Author | View in Thread

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@...>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@...>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 mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

 « Return to Thread: Possible to put path to boost library somewhere else than Jamroot file?