|
Boost-Build : |
From: Johan Nilsson (johan.nilsson_at_[hidden])
Date: 2004-10-20 05:35:54
"Vladimir Prus" <ghost_at_[hidden]> wrote in message
news:cl5ckp$rpl$1_at_sea.gmane.org...
>
> Johan Nilsson wrote:
>
[snip]
>
> You can. Top level Jamfile could look like:
>
> project my_project ;
> alias cppunit : deps/libs//cppunit ;
>
> and you'll be able to use "my_project//cppunit" in Jamfiles.
I tried that but get the following error:
error: Unable to find file or target named
error: 'myproj_deps//cppunit'
error: referred from project at
error: '../../../libs/mylib/tests'
The top level jamfile looks like this (slightly instrumented):
---- project : requirements <threading>multi <include>include <link-runtime>shared : default-build release : build-dir build ; use-project /mylib : libs/mylibs ; project myproj_deps ; alias cppunit : deps/libs//cppunit ; build-project libs/mylib ; build-project libs/mylib/tests ; --- referred to in libs/mylib/tests/Jamfile as: --- ... exe mylib_tests : # sources $(all_sources) //mylib myproj_deps//cppunit ... --- > > > > While I'm at it, a few more related questions: > > > > - Is there a rule available to run the resulting mylib_tests.exe file from > > the above Jamfile? > > Yes: > http://boost.org/boost-build2/doc/html/bbv2.advanced.builtins.targets.html#bbv2.builtins.testing > That require that I replace 'exe' with 'unit-test'; is there a way of doing this in two separate steps, e.g.: exe my_exe ; run-unit-test my_exe ; > > - Can I specify the output directory of the .exe (it depends on a couple > > of .dlls located in the bin directory)? > > No, at least now. You can use the "stage" rule in the meantime. That doesn't seem to play well with the unit-test rule referenced above (the tests are run at the original location, complaining about missing DLLs). // 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