Subject: Re: [Boost-build] Copy previous build target into current unit test directory
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2014-03-31 15:18:44
On 03/31/2014 11:41 AM, tr1gun wrote:
> i need to load a build com dll with an embedded manifest in a unit test.
> The manifest loading requires the dll in the same directory as the build
> unit test exe.
> Is it possible to copy the build dll and another manifest file into the
> created unit test directory?
Copying files is easy. Just use make with common.copy.
The problem is knowing the destination directory.
The easiest way is to use the unit-test rule instead
of run and use common.copy without an explicit <location>.
This will create a copy of the file in the build directory.
To handle run, you need to set <location-prefix> to
match the run rule. Actually getting this safely
is a bit painful, unless you're willing to rely on
knowing that testing.jam uses <location-prefix>$(target-name).test
local target = [ run test.cpp : : : <dependency>mylib.dll ] ;
local properties = [ $(target).requirements ] ;
local location-prefix = [ $(properties).get <location-prefix> ] ;
make mylib.dll : source-of-mylib : @common.copy :
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