Boost logo

Boost-Build :

From: Daniel Einspanjer (deinspanjer_at_[hidden])
Date: 2006-02-27 17:36:00


"Gennadiy Rozental" <gennadiy.rozental_at_[hidden]> wrote in message
news:dtvro7$7l6$1_at_sea.gmane.org...
> Getting started question: how to build only lib or only dll?

That is controlled by the <link> feature. <link>shared or <link>static

For a given lib target, you can specify your preference in the requirements
section.

# builds a static lib
lib foo
    : # sources
        test.cpp
    : # requirements
        <link>static
    ;

# builds a "dll"
lib bar
    : # sources
        test.cpp
    : # requirements
        <link>shared
    ;

You could also specify the requirement in a project if you wanted all libs
to be built a particular way.

# In Jamroot
project
    : requirements
        <link>static
    ;

Finally, if you haven't made it an explicit requirement (which I don't
believe can be overridden) then you can specify a different value for the
feature on the command line. e.g. If none of the <link> lines were in the
targets above, you could run
bjam link=static
and you would get static libs instead of the default shared.

You could even run
bjam link=static link=shared
And it would build both libs and dlls.

hth,
Daniel Einspanjer


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