Hi Uri,

Yes, here’s the example I did for our VxWorks wrapper for Boost.

We cross-compile on Windows and Linux, so it just make sure the defaults from the host environment aren’t used.

The feature.feature declares a feature called cross-compile with a possible option of vxworks

The feature.compose declares what selecting the option vxworks does.

 

feature.feature cross-compile

    : vxworks

    : composite propagated optional ;

 

feature.compose <cross-compile>vxworks

  : <target-os>vxworks

    <threadapi>pthread

    <threading>multi

    <inlining>full

    <optimization>speed

    <binary-format>elf

    <abi>sysv

  ;

 

From: Boost-build <boost-build-bounces@lists.boost.org> On Behalf Of Uri Moszkowicz via Boost-build
Sent: Friday, October 16, 2020 1:57 PM
To: boost-build@lists.boost.org
Cc: Uri Moszkowicz <uri@4refs.com>
Subject: [Boost-build] How do I specify a dependency for a feature?

 

Hi,

I'd like to specify a dependency for a feature, like below:

 

feature.compose <MyFeature>yes :

  <define>MY_FEATURE

  <toolset>gcc-6.0.0:<include>$(dir-6.0.0)/include

  <toolset>gcc-10.0.0:<include>$(dir-10.0.0)/include

 

Is there a way I can do this with Boost::build?

 

Thanks,

Uri