|
Boost : |
Subject: Re: [boost] Understanding Jam Files
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2014-07-24 14:47:16
AMDG
On 07/24/2014 09:35 AM, Axel Ismirlian wrote:
>
> I have been working on boost for about a month now, but I still don't fully
> understand boost's build configuration very well. More specifically, I do
> not understand where the properties array gets filled in and where that
> data comes from. I saw the property.jam file which seems to refine the list
> of properties and take away unmet conditions, and bind dependencies. I also
> saw the property-set.jam file which creates property lists from raw
> properties, but where do the raw properties come from exactly? Does every
> property-set created come through this file?
>
> It would be very helpful if someone could point me in the right direction.
>
Each target has three sets of properties: requirements,
default-build, and usage-requirements. When you build
a target, you pass it a property-set. The properties in
this property-set are overridden by the requirements, and
the default-build is used to fill in missing properties.
For example:
exe test : test.cpp : <link>static : <threading>multi ;
If you build test with <link>shared, <threading>single,
then the requirement of <link>static overrides <link>shared,
but the default-build of <threading>multi is ignored, because
<theading>single is already present.
In addition most features have a default value and
properties can be specified on the command line.
When building dependent targets, all features with
the propagated attribute will be passed on to the
dependencies.
For example, given:
obj test.o : test.cpp ;
exe test : test.o : <link>static <define>BOOST_ALL_NO_LIB ;
test.o will be built with <link>static, but not
-DBOOST_ALL_NO_LIB.
property-set.jam, property.jam, and feature.jam contain
the various functions for the low-level manipulation
of properties.
In Christ,
Steven Watanabe
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk