Boost logo

Boost Users :

Subject: [Boost-users] [Test] BOOST_TEST_NO_MAIN with pre-built BoostPro libraries
From: Alexander Lamaison (awl03_at_[hidden])
Date: 2009-08-08 05:57:39


Is it possible to create one's own main() implementation when using
the pre-built Boost libraries from BoostPro?

The difficulty seems to be that, even if I define BOOST_TEST_NO_MAIN
before including unit_test.hpp, the main method still exists in the
pre-built library and this causes a linker conflict. The existing
code I'm wokring on specifies /FORCE to the linker to make our main
override the library main but I think that's a horrible solution and
would really like to try something else.

Even better would be if there were a way to only invoke our code,
which includes calls to framework::run(test), if a particular
command-line argument were present. In all other cases it would be
nice to have the default test runner behaviour. I think this may be
wishful thinking though.

Any advice is greatly appreciated.

Alex


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