Boost logo

Boost Users :

Subject: Re: [Boost-users] Question about boost.build and automatic selection of toolsets
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2013-09-22 13:35:40


AMDG

On 09/21/2013 08:21 PM, Mauricio Carneiro wrote:
> I am using boost-build in my project (very happy with the outcome) but I
> would like to have the toolset selected automatically based on the
> operating system. Currently I am running successfully from the command line
> by manually setting the toolset when I am running it from macos and linux
> accordingly, but I feel like the Jamroot file should be able to figure that
> out for me.
>
> Any ideas?
>

The normal way to handle this is to use
a different user-config.jam on each OS.
If you want all the configuration to
be in a single file, you can use the
os module to find out the running OS.

import os ;

if [ os.name ] = OSX
{
    ...
}
else if [ os.name ] = UNIX
{
    ...
}

> I made a more descriptive post on stack overflow, to share the knowledge
> once we figure this one out.
>
> http://stackoverflow.com/questions/18939911/choosing-compiler-options-based-on-the-operating-system-in-boost-build
>

In Christ,
Steven Watanabe


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net