Boost logo

Boost-Build :

From: Kevin Wheatley (hxpro_at_[hidden])
Date: 2006-09-06 05:04:31


Phillip Seaver wrote:
> Any thoughts on this? One of my co-workers worked around the problem by
> doing a modules.poke of the requirements in the DLL build.jam and a
> modules.peek in the exe build.jam, so they're still only defined in one
> place, but I'd really like for this to work correctly.

you could create a requirements project, with a set of requirements
specified, then use an alias in that project as a fake target, you
would then referencwe that in the appropriate places...

project c-dll
         : requirements
                 <link>shared
         : usage-requirements
                 <include>c
         ;

lib c : c/c.cpp b : : : <include>c ;

# This allows us to pull a fake target to pick up the includes etc.
for this project
alias usage-requirements ;

Then something like this...

lib a : a/a.cpp : <link>static : : <include>a ;
lib b : b/b.cpp a : <link>static : : <include>b ;
use-project /c-dll : c-dll ;
build-project c-dll ;
exe d : d.cpp : <library>/c-dll//usage-requirements <link>static ;

Kevin

-- 
| Kevin Wheatley, Cinesite (Europe) Ltd | Nobody thinks this      |
| Senior Technology                     | My employer for certain |
| And Network Systems Architect         | Not even myself         |

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