Boost logo

Boost-Build :

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


Hi

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
modified.

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 =====================
[root]
  a.cpp -- library file
  b.cpp -- library file
  test.cpp -- unit test main
  Jamroot
  [executable]
    dep.cpp -- executable file
    Jamfile
===================================

===== LIST-2 =====================
% cd [root]
% touch a.cpp
% bjam
...found 17 targets...
...updating 4 targets...
msvc.compile.c++ bin\msvc\debug\link-static\a.obj
a.cpp
msvc.archive bin\msvc\debug\link-static\foo.lib
msvc.link 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
a.cpp
msvc.archive ..\bin\msvc\debug\link-static\foo.lib
msvc.link 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 acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk