Boost logo

Boost-Build :

From: Jurko Gospodnetić (jurko.gospodnetic_at_[hidden])
Date: 2008-07-30 05:56:48


   Hi Markus.

> The need for specifying the template depth has just come up for
> boost.integer on cxx and acc, which both default to 64.
>
> I tried adding
>
> flags hp_cxx.compile.c++ OPTIONS <c++-template-depth> :
> -pending_instantiations <c++-template-depth> ;
>
> to the toolset, but this results in only the feature value ending up in
> the command line.

   The problem here is that the Boost Build toolset.flags rule does not
allow specifying flag values that consist fixed text values with embeded
values read from the related property value. To achieve what you want
look at how the gcc and qcc toolset do it. They add a separate flag
whose value is just the property value and when they use it in an action
they prepend what is needed to it.

   In your case you'll most likely need something like this:

toolset.flags hp_cxxcompile.c++ TEMPLATE_DEPTH <c++-template-depth> ;
feature.set-default c++-template-depth : 64 ;

actions compile.c++
{
     $(CONFIG_COMMAND) -x cxx -c -std strict_ansi -nopure_cname
-noimplicit_include -timplicit_local -ptr "$(<[1]:D)/cxx_repository"
$(OPTIONS) "-pending_instantiations "$(TEMPLATE_DEPTH) -D$(DEFINES)
-I"$(INCLUDES)" -o "$(<)" "$(>)"
}

> And could we please change the first range of allowed feature values to
> include 64 with a stepping of 64? Because 64 is the default value for
> both acc and cxx.

   I'll update the predefined value range to include multiples of 64 up
to 1024. Until then you can easily extend the range where you need to
using the feature.extend rule.

   Hope this helps.

   Best regards,
     Jurko Gospodnetić


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk