|
Boost-Build : |
From: Rene Rivera (grafik.list_at_[hidden])
Date: 2003-12-20 16:27:25
Bronek Kozicki wrote:
> On Fri, 19 Dec 2003 07:30:41 -0600, Rene Rivera wrote:
>
>>s = Static link to runtime.
>>
>>In other words.. s != Static library.
>
>
> After some experiments I think I understood. This option
> "<runtime-link>static" will build one library:
> * static library (ie. .lib file, under correct libboost*.lib
> subdirectory), statically linked to runtime.
> This library will be built under runtime-link-static subdirectory (and
> possibly under runtime-link-static/threading-multi is multithreaded
> variant was selected)
Kind of... The <runtime-link>static has no bearing on what type of library is
built only which C++ runtime the library links against.
The type of library, static or dynamic, is determined by the specified targets
in the Jamfile:
lib boost_foo : ...
Builds a static library, and:
dll boost_foo : ...
Builds a dynamic library.
> However this option "<runtime-link>dynamic" builds two versions of each
> library:
> * dynamic library (ie. .dll and corresponding .lib file, under
> boost*.lib subdirectory), AND
No. It only builds one version for each target, that links against the dynamic
C++ runtime.
> * static library (ie. .lib file, under correct libboost*.lib
> subdirectory) dynamically linked to runtime.
The boost_foo.dll/lib and the libboost_foo.lib are two independent targets.
> In case single-threaded variant was selected, both libraries will be
> built directly under debug/release subdirectories.
Yes, because the default "debug" and "release" variants use single threading
as the default. This is done to reduce the length of paths as it causes
problems, earlier or later, in all execution environments (shells).
>If multithreaded
> variant was selected, libraries will be built under
> debug/threading-multi (or release/threading-multi) subdirectory.
Yes.
> Am I right ?
Mostly, but it's a strange way to think about it ;-)
..To clarify for you...
Your earlier build invocation of:
bjam -sTOOLS=whatever "-sBUILD=debug release <runtime-link>static/dynamic
<threading>single/multi"
Builds the product of all those combinations:
* debug, runtime-link-static, threading-single (base)
* debug, runtime-link-dynamic, threading-single
* debug, runtime-link-static, threading-multi
* debug, runtime-link-dynamic, threading-multi
* release, runtime-link-static, threading-single (base)
* release, runtime-link-dynamic, threading-single
* release, runtime-link-static, threading-multi
* release, runtime-link-dynamic, threading-multi
In which anything other than (base) variants get additional sub-directories to
differentiate them from the base variant.
Also for most boost libraries there are two targets built a dynamic link
library (.dll+.lib/.so/.dynlib) and a static link library (.lib/.a).
Which results in 8 variants times 2 targets, for a total of 16 libraries. Plus
8 possibly additional files, .lib-s for each .dll, and a symlink for each .so
if supported by the OS. And if you are building from the boost-root, and do a
stage or install it also creates one additional file per .lib or .so that
doesn't have the version number on it.
And lastly.. not all of those will be built as some may not make sense to
build. This is specified as requirements in the targets themselves (in the
Jamfiles). For example, it doesn't make sense to build boost_thread as
threading-single variants.
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera_at_[hidden] - grafik_at_[hidden] - 102708583_at_icq
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