Boost logo

Boost-Build :

From: Mat Marcus (mat-lists_at_[hidden])
Date: 2008-04-07 20:37:33

Some of my projects make use of boost build conditionals. In
particular. I make use of the Intel Thread Building Blocks Library. I
build my libraries under msvc and darwin. The (stable) version of the
Intel TBB is supported under msvc, and under darwin address-model=64,
but not under darwin address-model=32. To account for this state of
affairs I currently define a feature that tracks which tells whether
the atomics from the Intel TBB library is available for a particular
build. E.g.

#none doesn't mean no atomics--it means non-named value for the atomics feaure
feature atomics : none tbb : composite ;
#if change the next line then need to make parallel changes inside the
body of use-atomics
feature.compose <atomics>tbb : <include>../intel_tbb_libraries/include
feature.compose <atomics>none : ;

rule use-atomics ( properties * )
  local result ;
  if ( ! ( <toolset>darwin in $(properties) ) ) ||
   ( ( <address-model>64 in $(properties) ) ) ||
   ( ( <architecture>x86 in $(properties) ) ) {
         if ( <toolset>gcc in $(properties) && ( os<NT> || os<cygwin> in
properties ) ) {
     } else {
# need to copy the <include> and <define> items here...bjam does not
propagate them through
# the dependent usage_requirements below otherwise
          result += <atomics>tbb
<include>../intel_tbb_libraries/include <define>ADOBE_ATOMICS ;
  return $(result) ;

My top level project requirements in tree1/Jamfile.v2 include a
reference to this conditional:
# ...
  : default-build

This seems to work as expected within the tree1. But now I introduce a
second tree2 that depends on tree1. I'd like the conditional from
tree1 to be usable in tree2. In particular, tree2 depends on libs in
tree1 and I'd like to be able to use the conditional in the usage
requirements for all libs in tree1. I've not been able to succeed. Can
someone please advise me on how to arrange for tree1 libraries'
conditional usage requirements to be available in tree2?


(more details about my configuration can be found in )

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