Hi Brian,
Appreciate the reply. That's not quite what I was looking for. Rather than a single definition of the vxworks value, can you create two definitions? One for each version of GCC.

It occurs to me that I can also have two different values for cross-compile too but I'd like to know if it's possible for the same value.

Thanks,
Uri

On Sat, Oct 24, 2020 at 12:24 PM Kuhl, Brian <brian.kuhl@windriver.com> wrote:

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