Boost logo

Boost-Build :

From: Mikhail Glushenkov (bbman_at_[hidden])
Date: 2005-05-05 19:01:55


Vladimir Prus wrote:
> You probably can get aways with a loop
>
> for toolset in gcc msvc
> {
> for variant in "" D
> {
> # More loops
> lib ogg : :
> <file>./lib/$(toolset)/libogg$(variant)$(runtime)$(threading).
> $(lib-file-ex
> }
> }

Tried this with latest nightly.
After some tweaking(writing <toolset>msvc-7.1 in
requirements still does not work:-( )
I ended up with this:

for toolset in msvc-7.1 intel {
for variant in debug release
{
local suffix = "" ;
if $(variant) = debug {
suffix = D ;
}
local ext = lib ;
if $(toolset) = gcc {
ext = a ;
}
local dir = ./lib/$(toolset) ;
local ver = ;
if $(toolset) = msvc-7.1 {
toolset = msvc ;
ver = <toolset-msvc:version>7.1 ;
}

lib glew : : <file>$(dir)/glew32$(suffix).$(ext)
<variant>$(variant) <toolset>$(toolset) $(ver) ;
[and so on]
}
}
Probably worth mentioning in FAQ.

> <toolset>msvc-6.0 should work in current CVS.
Does not work for me, but I managed to hack up a
fix(included).
 --------------040506050100000404060608 Content-Type: text/plain;
name="match.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="match.patch"

diff -Naur v2-latest-unpatched/build/targets.jam v2-latest/build/targets.jam
--- v2-latest-unpatched/build/targets.jam Thu May 5 18:06:50 2005
+++ v2-latest/build/targets.jam Thu May 5 23:52:55 2005
@@ -1033,7 +1033,16 @@
local bcondition = [ $(self.requirements).base ] ;
local ccondition = [ $(self.requirements).conditional ] ;
local condition = [ set.difference $(bcondition) : $(ccondition) ] ;
- if $(condition) in [ $(property-set).raw ]
+
+ local condition-filtered ;
+ for c in $(condition) {
+ if [ MATCH "(^<toolset>)" : $(c) ] {
+ c = [ feature.expand-subfeatures $(c) ] ;
+ }
+ condition-filtered += $(c) ;
+ }
+
+ if $(condition-filtered) in [ $(property-set).raw ]
{
return $(condition) ;
}
 --------------040506050100000404060608--


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