Boost logo

Boost-Build :

From: Dmitry Teslenko (dteslenko_at_[hidden])
Date: 2007-07-17 05:53:43


Hello!

On 16/07/07, Chris Fairles <chris.fairles_at_[hidden]> wrote:
> What I do is (as the BB doc's suggest in the FAQ) is create a global
> site-config.jam file.
>
> Now I use, gcc so this might look different than what you might use
> but it looks like:
>
> import project ;
> project.initialize $(__name__) ;
> project site-config ;
> using gcc : 4.1.1 ;
> using gcc : 3.4.6 : g++34 ;
>
> lib boost_thread : : <name>boost_thread-mt <threading>multi ;
> lib boost_program_options : : <name>boost_program_options-mt <threading>multi ;
> lib boost_program_options : : <name>boost_program_options <threading>single ;
> ... all other boost libs installed
>
> I also add "pkg-config"-like aliases for other non-boost libs :
>
> alias ffmpeg : : : : <find-shared-library>avformat
> <find-shared-library>avutil <find-shared-library>avcodec ;
>
> (to my knowledge <find-shared-lib> works for unix only)
>
> So in my Jamfile's files I just do:
> exe main: main.cpp /site-config//boost_filesystem ;

Thanks, Chris!
This is more flexible solution. But I have to provide compiler name
and LIBPATH in site-config.jam:
> lib boost_thread : : <name>boost_thread-<compiler>-mt <threading>multi <search><path to libs> ;
and path to library includes in project requirements:
project
    : requirements <include>$(BOOST_PATH) <threading>multi
    ;
That works great.

But I guess if I want to control static-or-dynamic linkage against
libraries I must to go with library targets in local Jamfile:
lib boost-filesystem
       : [ glob $(BOOST_PATH)/libs/filesystem/src/*.cpp ]
       : <link>static
       ;


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