|
Boost-Build : |
From: Vladimir Prus (ghost_at_[hidden])
Date: 2007-05-26 02:53:02
On Saturday 26 May 2007 00:43, Motonari Ito wrote:
> Hi,
>
> I just found my Outlook was configured to use HTML mail which may have
> prevented you from reading this. I'm very sorry for this.
>
> --------------------------
> Hello,
>
> Let's say, you have an executable (foo.exe) and DLL (bar.dll). In debug
> build, the DLL is renamed to "bar-d.dll" (See List-1). Now, the
> executable wants to LoadLibrary() the DLL. (See List-2). Is it possible
> to pass the actual DLL filename to foo.exe so that foo.exe can load the
> correct DLL for release / debug builds?
>
>
> ##########################
> # List-1
> ##########################
> import virtual-target : add-prefix-and-suffix ;
>
> rule rename ( name : type ? : property-set ) {
> local postfix ;
> local properties = [ $(property-set).raw ] ;
> if <variant>debug in $(properties) { postfix += d ; }
>
> local result = $(name)-$(postfix:J=-) ;
>
> return [ add-prefix-and-suffix $(result) : $(type) : $(property-set)
> ] ; }
>
> lib bar : bar.cpp
> : <tag>@rename
> <link>shared
> ;
>
> exe foo : foo.cpp
> : <define>FOO_FILENAME=????
> ;
So, you want to pass this value at compile time? This might be tricky,
let me think about this for a while.
- Volodya
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