Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2002-11-26 18:32:08


Vladimir Prus <ghost_at_[hidden]> writes:

> I has thinking about the way system libraries are
> used. For now, there's inherited from V1 method
>
> exe a : a.cpp : <find-library>zlib <library-file>helper.a ;
>
> There are some problems:
>
> 1. <find-library> is long and non-intuitive.

Yup.

> 2. It differs from using library targets, for no good
> reason.

OK, good thought.

> Moreover, consider that on Windows, a library
> called 'expat' must be built by Boost.Build, so we
> have to write
>
> exe main : main.cpp : <library>expat
>
> But on Linux this library is already awailable, so we better
> use
>
> exe main : main.cpp : <find-library>expat
>
> This difference is messy.

Yup.

I think it's time to look at
http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl?Configuration_And_Installation
again.

> 3. I remember that Markus requested that "find-library" had
> static and dynamic version (i.e "link this system library
> statically"). But
>
> <find-library-static>zlib
>
> is just too long. An further, if 10 applications use zlib,
> do they all have to specify it?

Ick.

> So, I propose to
>
> 1. Kick "find-library". Introduce new "system-lib" target type.
> For example:
>
> system-lib zlib ;
> exe a : a.cpp : <library>zlib ;

Why "system"?

> It's possible to specify static linking
>
> system-lib zlib : <shared>false ;

Hmm. Isn't it true that you can link statically or dynamically to the
same .so on unix?

> There will be some implementation gotchas, but they're not
> serious. How does it look from the interface standpoint?

Not sure yet. I need a more precise description of what it's supposed
to do.

> 2. Kick <library-file> as well. Allow to specify file name as value
> of <library> features.
>
> exe a : a.cpp : <library>zlib <library>helper.a ;

library-file also allows full path specification. Are we going to do
that, too?

-- 
David Abrahams
dave_at_[hidden] * http://www.boost-consulting.com
Boost support, enhancements, training, and commercial distribution
 

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