Boost logo

Boost-Build :

Subject: Re: [Boost-build] Duplicate name of actual target
From: Juraj Ivanèiæ (juraj.ivancic_at_[hidden])
Date: 2012-08-15 15:44:13


On 15.8.2012. 13:27, Dave Abrahams wrote:
>
> I've never had a clue how to address this problem when it happens, and
> it's happening again. Could someone please lend a hand?

I've had my share of those. This is pretty much minimal example that
demonstrates this error:

---- Jamfile

exe aaa : aaa.cpp ;
install install-aaa : aaa : <location>here ;

---- Jamfile

If you call bjam with multiple variants (variant=debug,release) it will
fail with a similar error to the one you posted because both variants of
install target compete for the same filesystem location.

You could change the location depending on the variant (change output
dir or mangle name with <tag>). Or hardcode that it should be build only
in e.g. release. Or avoid building both variants in a single bjam
invocation (i.e. avoid '--build-type=complete')

For python extensions I usually add '_d' suffix to debug variant as this
actually needed when you want to import it with debug python executable.
If this is OK for your situation here is a little time-saver:

rule fix-py-suffix ( name : type : prop-set )
{
     if $(type) = PYD && [ $(prop-set).get <variant> ] = debug
     {
         return $(name)_d.pyd ;
     }
}

pyd test : ... : <tag>@fix-py-suffix

HTH


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