Boost logo

Boost-Build :

From: David Abrahams (dave_at_[hidden])
Date: 2004-08-22 16:40:15


Could some of the several people using BBv2 please pitch in to help
this guy out? I hardly ever use it, so the answers don't come easily
to me!

Altec <altecrtcw_at_[hidden]> writes:

> This might be a kludge but worked for me.
>
> 1. grab toolset+version from command-line args
> 2. set var to correct directory based on toolset
> 3. use var with <search>
>
>
> import modules ;
> if msvc-7.1 in [ modules.peek : ARGV ] {
> IVLIBDIR = z:/lib/vc7/mt ;
>
> } else if msvc-6 in [ modules.peek : ARGV ] {
> IVLIBDIR = z:/lib/vc6/mt ;
>
> } else {
> ECHO "ERROR: Please specify msvc-6 or msvc-7.1" ;
> exit ;
> }
>
> lib fooLib
> : : <name>fooLibd <search>$(IVLIBDIR) <toolset>msvc <variant>debug
> ;

Definitely the wrong way to go about this. There are conditional
properties. You want something like

lib fooLib
:
: <name>fooLibd
<toolset>msvc-7.1:<search>z:/lib/vc7/mt
<toolset>msvc-6:<search>z:/lib/vc6/mt
<toolset>msvc
<variant>debug
;

Though it might turn out to be a bit uglier:

lib fooLib
:
: <name>fooLibd
<toolset>msvc/<toolset-version>7.1:<search>z:/lib/vc7/mt
<toolset>msvc/<toolset-version>6:<search>z:/lib/vc6/mt
<toolset>msvc
<variant>debug
;

Though as long as msvc is a *requirement*, maybe

lib fooLib
:
: <name>fooLibd
<toolset-version>7.1:<search>z:/lib/vc7/mt
<toolset-version>6:<search>z:/lib/vc6/mt
<toolset>msvc
<variant>debug
;

is enough.

P.S. We like to know the names of the people with whom we're
conversing, if you don't mind. Since you call yourself "RubyScript"
elsewhere, I assume "Altec" is a pseudonym.

-- 
Dave Abrahams
Boost Consulting
http://www.boost-consulting.com
 

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