|
Boost-Build : |
From: Jurko GospodnetiÄ (jurko.gospodnetic_at_[hidden])
Date: 2008-06-30 08:22:12
Hi Phil.
> Iâm looking for a way to configure the output of bjam so that I can
> builds output depending on OS_COMPILER_VARIANT in a bin directory one
> above my Jamroot. For example if bjam was invoked on an MSVC configured
> Windows machine the build would be outputted to:
>
> [Jamroot location]/../bin/windows_msvc_release
>
> Iâve worked out a simple way of doing this, an example is shown below
> which only depends on the variant â but the code feels wrong; what I am
> assuming I can do (but canât get to work) is interrogate the
> <target-os>, <toolset> and <variant> keys directly from the my rule and
> generate a return path directly from their values, rather than testing
> each key in turn to see if it equals some predetermined value.
Does something like the following do what you want:
install my-dist
:
...my-targets-to-install...
:
<variant>debug:location>debug-location
<variant>profile:<location>profile-location
<variant>release:<location>release-location ;
Alternatively, if you need a more complex condition you can look into
using functional properties like <location>@my-location-rule. I might
have gotten the syntax wrong here but it should be easy to find in the docs.
You can condition your location on multiple properties ofcourse like in:
<variant>debug/<os>AIX:<location>somethere-over-the-rainbow
Again... writing this from memory so it might be wrong (e.g. might be
, instead of /)... but it should not be hard to test and/or find in the
documentation.
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