Boost logo

Boost-Build :

Subject: [Boost-build] duplicate dependencies in bjam backend
From: Stefan Seefeld (stefan_at_[hidden])
Date: 2016-12-16 13:55:35


Hi,

this question is about the low-level bjam Python module and its use.

It happens that in my Python layer I'm occasionally declaring a
dependency more than once (for example in the context of generators,
where a meta-target instantiates multiple variants of a target).

It appears the backend happily accepts that, and then simply invokes the
registered action multiple times (on the same target). Is that to be
expected ?

How does b2 deal with that ? Does it internally guards against multiply
declared dependencies ? Or does it have some other mechanism to avoid that ?

Specific example: If I declare an "exe" with a source file "hello.cpp",
then instantiate that twice (with two sets of features), I get a
dependency for "hello.o" -> "hello.cpp" twice. Does b2 always make sure
that the feature-dependent "hello.o" target ends up in a different
directory, thereby causing these two "hello.o" targets to use different
names ? Or is there some other trick I'm overlooking ?

Thanks,

        Stefan

-- 
      ...ich hab' noch einen Koffer in Berlin...

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