Boost logo

Boost-Build :

From: Motonari Ito (motonari_at_[hidden])
Date: 2006-03-17 14:50:53


I have a small project which consists of a static library, an executable,
and unit test. (LIST-1, and attachment)

Now, I want to run unit test whenever source files of the library are

It works fine if bjam is started at [root] as LIST-2.

However, it does not work if it's started at [executable] as LIST-3.

Could you please give me any idea how to solve this?

Thank you.

===== LIST-1 =====================
  a.cpp -- library file
  b.cpp -- library file
  test.cpp -- unit test main
    dep.cpp -- executable file

===== LIST-2 =====================
% cd [root]
% touch a.cpp
% bjam
...found 17 targets...
...updating 4 targets...
msvc.compile.c++ bin\msvc\debug\link-static\a.obj
msvc.archive bin\msvc\debug\link-static\foo.lib bin\msvc\debug\ut.exe
testing.unit-test bin\msvc\debug\ut.passed <-- UNIT TEST WORKS!
...updated 4 targets...

===== LIST-3 =====================
% cd [root]/[executable]
% touch ../a.cpp
% bjam
...found 20 targets...
...updating 3 targets...
msvc.compile.c++ ..\bin\msvc\debug\link-static\a.obj
msvc.archive ..\bin\msvc\debug\link-static\foo.lib bin\msvc\debug\executable.exe
...updated 3 targets... <-- UNIT TEST DOES NOT WORK

Motonari Ito (motonari_at_[hidden])

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