Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-12-27 03:56:57


Hi Alan,

> > 1) I'm going to try building a library that contains the
> > platform specific source files, and somehow, switch on which
> > libraries are included, based on compiler.
>
> Stuck. Found this documentation:
>
> http://www.boost.org/doc/html/bbv2/tutorial/conditions.html
>
> "Sometimes different variant of a target are so different,
> that describing them using conditional requirements would
> be hard. Imagine that a library has different sources on two
> supported toolsets, and dummy implementation for all the other
> toolset. We can express this situation using target alternatives:"
>
> lib demangler : dummy_demangler.cpp ;
> lib demangler : demangler_gcc.cpp : <toolset>gcc ;
> lib demangler : demangler_msvc.cpp : <toolset>msvc ;
>
> I've put this in my Jamfile.v2:
>
> lib libosui : src/dummy.cpp ;
> lib libosui : src/dummy.cpp : <toolset>msvc ;
> lib libosui : src/dummy.cpp : <toolset>gcc ;
>
> And on OS X I get:
>
>
> /Users/alan/var/build/boost_1_32_0/tools/build/v2/build/feature.jam:431: in
> feature.validate-value-string from module featureerror:
> "msvc" is not a known value of feature <toolset>error: legal
> values: "darwin"

For now, just add

using msvc ;
using gcc ;

to your user-config.jam. A better solution will arrive a bit later.

- 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