Boost logo

Boost Users :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2006-03-06 11:12:48


"Mateusz Loskot" <mateusz_at_[hidden]> wrote in message
news:duf9bl$72t$1_at_sea.gmane.org...
> Hi,
>
> I'm going to add Unit Tests to one of projects.
> It's quite big project, so there will be many tests suits and cases.
> The project build system is based on automake for Unix and nmake for
> Windows.
> I wonder what is the best practice to include Boost.Test
> frameworks to my own project?
>
> Currently I consider only Unit Test Framework.
>
> I see following possibilities:
>
> 1. Boost libraries are installed from official release
> (precompiled or compiled by user)
> Makefiles for my project try to detect if Boost exists and link to
> Unit Test Framework librar.
> Here Boost has to be listed in compilation requirements of my project.

This option is more or less safe. Since:

1. Boost is installed in many places now
2. Your own code is quite possibly will have to use boost itself.

Don't forget though that you will depend on some particular version of
boost. Not just any available.

> 2. Boost.Test libraries in binary form are included to my project tree
> and shipped together.
> So there is no requirement to have complete Boost installed, because
> test can link to UTF library already present

This option is probable safest. Becuse you doesn't require boost
dependencies and doesn't require particular version of boost installed. On
the other hand it will enlange the size of you deliverables.

> 3. Include Boost.Test source code and allow user of my project to build
> UTF library on his own. Here I expect some problems with bjam/makefiles
> incompatibility. So, bjam would be required on user's platform.
> Simply, this solution seems to be quite confusing for user.

UTF building doen't require that much effort. User could use any make system
without probles. There is no additional options required Look on compilation
intrsuction in cvs. bjam really is not that complicated either. Just
something many not familiar with.

> I'd like to know your comments about which solution is best and what are
> possible traps hidding.
> Regarding the 1 solution I think there may be possible problem with
> using incorrect Boost.Test version.
> The second one involves additional work for overall projct maintenance.

You right on both counts. I would supply prebuilt UTF binaries as a separate
optional. delivarable. Happy owners of proper boost version could use their
UTF (build one first one way or another). The rest could download one you
supply.

 Regards,

Gennadiy


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net