Boost logo

Boost-Build :

Subject: [Boost-build] Using pre-built shared libraries with unit-test
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2009-01-26 09:48:04


Hi,

when using shared library targets as a dependency to a unit-test target,
their path(s) are automatically set in the environment before actually
running the unit-test target (under Windows, at least).

However, in my project's Jamroot I have a couple of pre-built shared
libraries defined, e.g.:

--- Jamroot ---
project root
  : default-build
  <link>shared
  ;

# NOTE: These library definitions actually refer to "import" libraries. Dlls
are located in the same directory.
lib foo
  :
  : <file>$(ROOT)/deps/lib/foo-mt-gd.lib <link>shared <variant>debug
<toolset>msvc
  ;

lib foo
  :
  : <file>$(ROOT)/deps/lib/foo-mt.lib <link>shared <variant>release
<toolset>msvc
  ;

---
In a subproject, I then try use these as e.g.:
--- bar.jam ---
unit-test bar
    : bartest.cpp
    : <library>/root//foo
    ;
---
However, the path of the "foo" library doesn't seem to be used by the unit 
test. Is there a simple way to have unit-test set up the additional path 
component before running the "bar" unit-test?
/ Johan

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