Boost logo

Boost :

From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2008-01-11 02:00:13

Jens Seidel <jensseidel <at>> writes:
> So Benoit tries to find an easy way to test a system whether Boost.Test
> is available.

This is quite open ended question. What specifically are you trying to detect?

Presence of Boost.Test headers?
Presence of prebuild Boost.Test libraries (static and/or dynamic)?
Presence od single header variant of Boost.Test?
Presence of Unit test framework or program execution monitor or just an
execution monitor.
Support for specific feature in Boost.Test

I would guess each require separate and different test.

> What does "outside of UnitTest framework" mean? Do you refer to a
> special namespace, the requirement to link against the boost-unittest
> library or what?

No. I mean outside of test case - directly in main()
> Benoit: As Gennadiy pointed out (thanks) it is possible to define the macro
> whether shared or static libraries are used directly in the Makefile.
> I'm sorry to note that I consider it now your job to determine whether
> you link against the shared or static library and to set BOOST_CXXFLAGS
> accordingly.

Depending what are you are trying to find you will need different tests and
potencially different make rules.

> You probably have to check whether test code compiled with
> or without a user specified main function to determine this. Maybe Gennadiy
> can help even more by providing a single (two or three lines only) check
> for both?

I am not quite sure what main() has to do with it. From where I stand, you
don't need main() in either case.


Boost list run by bdawes at, gregod at, cpdaniel at, john at