Boost logo

Boost-Build :

Subject: [Boost-build] Projects requirements and alternative selection
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2009-04-15 08:38:28


I'm experiencing some "problems" with target selection. A simplified

-------------------- Jamroot ------------------
project foo
 : requirements

 : default-build


# release
lib bar
 : <file>a.lib <threading>multi <link>static <runtime-link>shared

# debug
lib bar
 : <file>a_d.lib <threading>multi <link>static <runtime-link>shared
------------------ Build output -----------------------
error: No best alternative for ./bar
    next alternative: required properties: <link>static <runtime-link>shared
<threading>multi <variant>release
        not matched
    next alternative: required properties: <link>static <runtime-link>shared
<threading>multi <variant>debug
        not matched
...found 1 target...

Note that if I declare e.g. an exe target that references the 'bar' lib, the
correct library is selected and linked with, but the above error messages
still appear (build is not aborted). What seems to be the culprit is that
threading defaults to "single" and link to "static" and that this is added
to the build request. This is the output from some tracing added to
select-alternatives in targets.jam:

Original: <debug-symbols>on

With defaults: <asynch-exceptions>off

Is this as expected - I had a gut feeling that the requirements set by
"project" should be added to the "build" request for the bar lib in the
above scenario?

I've tried the above using Boost.Build from trunk as well as from 1.34.1.
Toolset is msvc (set in user-config.jam).

Thanks / Johan

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at