List Info

Thread: How to reference Boost header include path fromoutside the Boost tree?




How to reference Boost header include path fromoutside the Boost tree?
user name
2006-03-30 17:08:04
John Maddock wrote:
>> You should using something like this:
>>
>>  projec yours :
>>     requirements <use>path_to_boost//headers
;
>>
>>  run myfile ;
>>
>> Or you can have:
>>
>>  run myfile path_to_boost//headers ;
>>
>>
>> This is not fully covered in docs, I'll try to
update
>>
>> http://www.boost.org/boost-build2/
doc/html/bbv2/faq/header-only-libraries.html
>>
>> with information about *using* header-only
libraries, as opposed to
>> declaring them.
>>     
>
> What advantage does that have over just
<include>path-to-boost ?
>
> In any case it completely misses the point: I know
where Boost is on my 
> machine, I don't know where it is on someone elses
machine (who may be 
> running my examples).  bjam on the other hand *does*
know where boost is, 
> because it's located the build system.  It's that
information I want to pull 
> out.
>
> John. 
>   
The advantage is that you get the other usage requirements. 
In the
version I have, boost//headers has "<include>.
<define>BOOST_ALL_NO_LIB=1" in its usage
requirements.  So, that will
add BOOST_ALL_NO_LIB=1 to the list of defines for your
compiles in
addition to giving you the include directory.  That's one
of the major
advantages of boost-build for me:  the project sets usage
requirements
so that all the project users don't have to.

As David said, you should use "/boost//headers".
 The other user may
have to do "use-project /boost : path_to_boost
;", depending on their setup.

On my system, I use the 1.33.1 distribution of boost, but I
use the
latest boost-build out of CVS in a separate directory.  So,
knowing
where boost-build is wouldn't help you find boost at all.

Phillip

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )