Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-07-28 02:33:00


Hi Peter,

peter_schoen1_web_de wrote:

> is it possible to get Boost.Build v2 to create a variant directory for
> the build platform, like:
>
> .../src/bin/linux/gcc/debug/... ?
> .../src/bin/solaris/gcc/debug/... ?
>
> This would be handy because I could build from the same codebase
> (located e.g. on a NFS drive) on the various platforms.

IOW, you've got several target operating system and would like V2 to
distinguish between them? One approach would be to add, in your
'project-root.jam', the following code:

import feature : feature set-default ;
import os ;

feature target-os : solaris linux : implicit symmetric ;

local os-name = [ os.name ] ;
feature.set-default target-os : $(os-name:L) ;

This will add a feature which controls target os, and make V2 to add that
feature to target path. The default value of the feature will be the same as
the os you're running. One note: I don't know what's the value of 'os.name'
on solaris, and can't test since bjam does not want to build on the only
solaris installation I have nearby, so you might need to change "solaris" to
something else.

Is the above approach OK for you?

- Volodya

 


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