Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2002-11-26 08:39:24


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.

2. It differs from using library targets, for no good
reason. 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.

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?

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 ;

It's possible to specify static linking

system-lib zlib : <shared>false ;

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

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 ;

For me, this looks like a pure enhancement.

- Volodya

 


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