"Gennadiy Rozental" <gennadiy.rozental thomson.com> wrote in message
news:dtvro7$7l6$1 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
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build
a>
|