Boost logo

Boost Users :

Subject: [Boost-users] [test] Standalone use with multiple translation units?
From: Adam Nielsen (a.nielsen_at_[hidden])
Date: 2016-05-07 04:32:50


Hi all,

I am currently using Boost Test for my test code, however it is always
an extreme headache trying to get Boost available on the target
platforms I'm using. At the moment due to some environment
restrictions it is just not possible to use a recent version of Boost,
and since the Test library broke backwards compatibility with 1.59, my
code will no longer compile on versions earlier than 1.59.

So I am looking to see whether I can avoid the need to compile the full
Boost, and just pull in the bits that I need.

The Boost Test docs say that the library can be used in single-header
mode, however this only works when there is one translation unit.
Since my tests are spread across dozens of files, I don't think this
will work for me.

Is there any way to use this single-header mode, and flag one file as
the "primary" one, and others as extras, so that you can use
single-header mode across multiple translation units?

This would remove the need to do battle with getting the Boost
libraries installed on various platforms, which would make it much
easier and allow me to spend more time on my code, and less time on
writing build scripts.

Many thanks,
Adam.


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