Boost logo

Boost-Build :

From: Johan Nilsson (johan.nilsson_at_[hidden])
Date: 2004-10-20 04:45:57


"Vladimir Prus" <ghost_at_[hidden]> wrote in message
news:200410201326.01037.ghost_at_cs.msu.su...
>
> Hi Johan
>
> > a couple of minor bbv2 questions:
> >
> > - Is there a way of declaring and using path-independent pre-built
targets?
>
> Could you clarify?

Using this directory structure:

------
<root>
Jamfile.v2
project-root.jam
... etc ...
/bin
/deps
/libs
Jamfile.v2
cppunit.lib
cppunitd.lib (debug)
/libs
/mylib
Jamfile.v2
/tests
Jamfile.v2
main.cpp

---
How do I use deps/libs/cppunit(d).lib? I've managed to create the jamfile in
deps/libs:
lib cppunit
:
: <file>cppunit.lib <variant>release
;
lib cppunit
:
: <file>cppunitd.lib <variant>debug
;
using it from libs/mylib/tests:
-- Jamfile.v2 ---
...
exe mylib_tests
: # sources
$(all_sources)
//mylib
../../../deps/libs//cppunit <= !!!
: # requirements
<include>.
<include>../../../deps/cppunit/include
<library-path>../../../deps/libs
: # default-build
: # usage-requirements
;
..
------------------------
The above works, but I was merely wondering if I could make some global
definition in the top-level Jamfile.v2 to reference the cppunit target
without the path specification (similar to what I do with mylib above).
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?
- Can I specify the output directory of the .exe (it depends on a couple of
.dlls located in the bin directory)?
- Can I set the output target name(s) to indicate debug/release version
(e.g. mylib_tests_d.exe, mylib_d.exe)?
>
> > - Where did $(SUFLIB) et al go?
>
> It's 'type.set-generated-target-suffix'.
Sorry, I'm perhaps a bit slow today, but how would I use that in e.g. the
deps/libs/ Jamfile.v2 from above?
Thanks // 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