|
Boost : |
From: Rene Rivera (grafik.list_at_[hidden])
Date: 2005-01-22 14:20:47
Jody Hagins wrote:
> and so on. As you can see, it ignores the --builddir command line
> option. This is the source of my first confusion since the
> documentation indicates that bjam will "find" the Jamrules for the
> project (which it obviously does, or it would not know how to build
> everything, I imagine).
>
> I get similar behavior in other subdirectories. Since running in a
> subdir is probably common, I imagine I am missing something,...
Yes running in a subdir is common.. But placing the build results
outside of the Boost tree is not common for developers. What the
boost-root/Jamfile does is it translates all those autoconf like
switches into variables and targets Boost.Build understands. In the case
of "--builddir" it translates it to the global "ALL_LOCATE_TARGET". We
know the docs are not good on this.. But here's the relevant info:
http://www.boost.org/tools/build/v1/build_system.htm#user_globals
So if you are in the test subdir you would:
bjam "-sTOOLS=gcc" "-sALL_LOCATE_TARGET=/home/jody/boost-build"
> In addition, I will need to do something "special" in the test, and I
> can ont find a good example in other test Jamfiles. For my test, I need
> to create a shared library locally for testing, but I do not want it
> installed anywhere. I simply need it for testing the dll code ability
> to open/close/find symbols.
No so special.. Boost.Config does just that also. Look at
libs/config/test/link/Jamfile which declares the LIBs and DLLs. It's
probably a good idea to have it as config has it in a subdirectory, as
it lets you test just that build by itself. And in your
library-root/libs/<library>/test/Jamfile you add references to those
libraries. In the case of Boost.Config it's tests are directly in
status/Jamfile:
test-suite config
: [ run libs/config/test/config_test.cpp
: #args
: #input-files
: #requirements
<threading>multi <no-warn>config_test.cpp
]
[ run libs/config/test/config_info.cpp : : :
<test-info>always_show_run_output ]
[ run libs/config/test/abi/abi_test.cpp
libs/config/test/abi/main.cpp ]
[ run libs/config/test/limits_test.cpp
<lib>../libs/test/build/boost_test_exec_monitor ]
[ run libs/config/test/link/main.cpp
<dll>../libs/config/test/link/link_test
: #args
: #input-files
: #requirements
<runtime-link>dynamic
<define>BOOST_DYN_LINK=1
<define>BOOST_CONFIG_NO_LIB=1
:
config_link_test
]
[ compile-fail libs/config/test/threads/test_thread_fail1.cpp ]
[ compile-fail libs/config/test/threads/test_thread_fail2.cpp ]
;
But you can do the same in you test/Jamfile. Above the reference to the
DLL is "<dll>../libs/config/test/link/link_test", of course you would
use different paths ;-)
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk