Boost logo

Boost-Build :

From: Taras Svirsky (stx_at_[hidden])
Date: 2004-09-13 03:16:18

Hi All,

Does anybody know how to solve below problem:
I have some lib (lets call it libA ) and unit test for that lib,
but for running unit test I should link it with some shared library and
before runing unit-test I should
copy binary file ( dll ) of that library to the current dir of unit test
( I don't want to copy it to the system path like c:\winnt\system32 ).
Trying to do this with stage targets failed with following bjam errors:

>c:/X/build-system9.1/v2/build\targets.jam:1064: in construct from module
>error: unable to construct ./call_unit_test
>c:/X/build-system9.1/v2/build\targets.jam:888: in
object(typed-target)@1.generate from module object(typed-target)@1
>c:/X/build-system9.1/v2/build\targets.jam:510: in generate-really from
module object(main-target)@3
>c:/X/build-system9.1/v2/build\targets.jam:483: in
object(main-target)@3.generate from module object(main-target)@3
>c:/X/build-system9.1/v2/build\targets.jam:179: in
object(project-target)@8.generate from module object(project-target)@8
>c:/X/build-system9.1/v2\build-system.jam:160: in load from module
>c:/X/build-system9.1\v2/kernel\modules.jam:259: in import from module
>c:/X/build-system9.1\v2/kernel/bootstrap.jam:120: in boost-build from
>c:/X/boost-build.jam:12: in module scope from module

I use following jamfiles to build lib and test for it

-------------------libA/jamfile -------------------------
lib libA :
../../thirdparty/log4cpp-0.3.4b #this is library for logging
that should be linked as dll
-------------------libA/UnitTest/jamfile ------------
exe libtest :

stage run-test : libtest ;

unit-test call_unit_test : run-test ;

if I delete unit-test target everything work properly (bjam builds
executable, lib and shared lib
and copies *.exe and *.dll to run-test directory), but then I should call
them manually :(

Will be greatfull for any ideas how to solve this proble using bjam.
(for now I have external shell script that runs bjam first and than calls
executable, but I don't really like such solution)

p.s. I'm using
Boost.Build V2 (Milestone 9.1)
Boost.Jam 03.01.09
Boost.Jam Version 3.1.9. OS=NT.


Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at