Hi, within the tests of a (not-yet) boost-library, how can I find out the path where b2 placed the binaries of the 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
On 14.02.2014 16:17, dib wrote:
Hi,
within the tests of a (not-yet) boost-library, how can I find out the path where b2 placed the binaries of the 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");
Hi, please use: [ run shared_library_load_test.cpp : : test_library ] and the path to your library will be passed to the test as command-line argument. - Volodya
participants (2)
-
dib
-
Vladimir Prus