Boost logo

Boost-Build :

From: John Reid (j.reid_at_[hidden])
Date: 2007-04-27 04:06:06


You might like to consider changing:
         <source>/site-config//log4cxx
to something like
         <source>log4cxx
as the site-config part is only relevant when the declarations are in
site-config.jam and I think because of the following lines:
project.initialize $(__name__) ;
project site-config ;

John.

Cheng Lian wrote:
> Hi, all
>
> I'm using bbv2 as my building system. But here is a question. The
> version is:
>
> ~$ bjam --version
> Boost.Build V2 (Milestone 10)
> Boost.Jam 03.01.11
>
> It a bit old, but I'd like a somehow stable version. My project refers
> to some standard libraries, such as pthread and log4cxx. When I declare
> them in the site-config.jam like things below,
> it all works:
>
> # site-config.jam
>
> import project ;
>
> project.initialize $(__name__) ;
> project site-config ;
>
> lib pthread
> :
> :
> <name>pthread
> <search>/usr/lib
> ;
>
>
> lib log4cxx
> :
> :
> <name>log4cxx
> <search>/usr/lib
> ;
>
>
> # My project-root.jam
>
> project
> :
> requirements
> <source>/site-config//boost_thread
> <source>/site-config//log4cxx
> :
> build-dir
> bin
> :
> default-build
> debug
> ;
>
> But when I move these declarations into the project-root.jam like this:
>
> # My proejct-root.jam
>
> lib pthread
> :
> :
> <name>pthread
> <search>/usr/lib
> ;
>
> lib log4cxx
> :
> :
> <name>log4cxx
> <search>/usr/lib
> ;
>
> project
> :
> requirements
> <source>/site-config//boost_thread
> <source>/site-config//log4cxx
> :
> build-dir
> bin
> :
> default-build
> debug
> ;
>
> Bjam complains things like this:
>
> error: Unable to find file or target named
> error: 'log4cxx'
> error: referred from project at
> error: 'server'
>
> And I found out that if I move the the 3rd party library declarations
> into the sub project Jamfiles, it also works:
>
> # My sub project Jamfile
> lib pthread
> :
> :
> <name>pthread
> <search>/usr/lib
> ;
>
> lib log4cxx
> :
> :
> <name>log4cxx
> <search>/usr/lib
> ;
>
> project server
> :
> requirements
> <include>include
> <link>static
> <source>../util
> <source>log4cxx
> <source>pthread
> ;
>
> exe server
> :
> [ glob src/*.cpp ]
> ;
>
> How could I move standard library declaration into my project-root.jam?
> The document suggest that standard libraries should be declared in the
> site-config.jam since the installation location may vary among systems.
> But there're still reasons to declare some non-standard 3rd party in the
> project Jamfile, since I think it's no good to maintain a huge
> site-config.jam among several boxes with different OS running on, which
> is the very case that I am in.
>
> Thanks for any clarifications!
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build


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