path of test-binary
Hi, how can I get the path where b2 placed the binaries of boost tests? Problem is the following: some of the tests need the path to a shared library, which is built together with the tests. in the lib/mylib/tests/Jamfile.v2 I have the following: [...] # our test lib for shared library tests lib test_library : test_library.cpp ; test-suite mylib : # # shared library # [ run shared_library_load_test.cpp ] [ run shared_library_get_symbol_test.cpp ] # # [...] Inside shared_library_*_test.cpp I need something like this: boost::filesystem::path tstlib("bin.v2/libs/mylib/test/mycompiler/test_library.so"); As boost.build decides by itself where to put the binary, i cannot hardcode the path in the source-files.. Is there a way to get the path from boost.build? If not, how could I solve this problem? -- regards dib
[Please do not mail me a copy of your followup] boost-users@lists.boost.org spake the secret code <8ca5499fe94ce42ce8c224488a913126.squirrel@s1.all-simple.com> thusly:
As boost.build decides by itself where to put the binary, i cannot hardcode the path in the source-files.. Is there a way to get the path from boost.build? If not, how could I solve this problem?
I think there might be a boost.build variable containing this path that you could add as a define for the source file. I'm new to boost.build, however, so I don't have a specific recipe to try. -- "The Direct3D Graphics Pipeline" free book http://tinyurl.com/d3d-pipeline The Computer Graphics Museum http://computergraphicsmuseum.org The Terminals Wiki http://terminals.classiccmp.org Legalize Adulthood! (my blog) http://legalizeadulthood.wordpress.com
AMDG On 01/28/2014 01:21 AM, dib wrote:
# our test lib for shared library tests lib test_library : test_library.cpp ;
<snip> [ run shared_library_load_test.cpp ] [ run shared_library_get_symbol_test.cpp ] <snip>
Inside shared_library_*_test.cpp I need something like this: boost::filesystem::path tstlib("bin.v2/libs/mylib/test/mycompiler/test_library.so");
As boost.build decides by itself where to put the binary, i cannot hardcode the path in the source-files.. Is there a way to get the path from boost.build? If not, how could I solve this problem?
The run rule is declared as: rule run ( sources + : args * : input-files * : requirements * : target-name ? : default-build * ) You'll want to pass the target in input-files: run shared_library_load_test.cpp : : test_library ; This will add the path to test_library to the command line arguments when the test is run. In Christ, Steven Watanabe
participants (3)
-
dib
-
legalize+jeeves@mail.xmission.com
-
Steven Watanabe