Boost C++ Libraries


Chapter 7. Frequently Asked Questions

Table of Contents

How do I get the current value of feature in Jamfile?
I am getting a "Duplicate name of actual target" error. What does that mean?
Accessing environment variables
How to control properties order?
How to control the library linking order on Unix?
Can I get capture external program output using a Boost.Jam variable?
How to get the project root (a.k.a. Jamroot) location?
How to change compilation flags for one file?
Why are the dll-path and hardcode-dll-paths properties useful?
Targets in site-config.jam
Header-only libraries
What is the difference between Boost.Build, b2, bjam and Perforce Jam?

How do I get the current value of feature in Jamfile?

This is not possible, since Jamfile does not have "current" value of any feature, be it toolset, build variant or anything else. For a single run of Boost.Build, any given main target can be built with several property sets. For example, user can request two build variants on the command line. Or one library is built as shared when used from one application, and as static when used from another. Each Jamfile is read only once so generally there is no single value of a feature you can access in Jamfile.

A feature has a specific value only when building a target, and there are two ways you can use that value: