On Wed, 2011-07-27 at 11:15 +0200, Patrick Ohly wrote:
[snip useful hints]
> 2. Remove the --enable-unit-tests configure option, so that
that
main
> build does not include the unit-tests code, allowing autotools to
> create a separate build with ENABLE_UNIT_TESTS defined, which the
builds
> will link against. That will almost double the build time, but it
seems
> correct.
I don't like that. I compile with --enable-unit-tests. Doubling my
compile time would be a considerably productivity hit.
This could be avoided if the unit tests were not in the same source
files, of course. If necessary they could be next to the source files
with a _test.cpp suffix, though I personally prefer to keep them
separate.
That would also avoid the risk of the unit tests succeeding just because
the whole source file was not even part of the build.
--
murrayc(a)murrayc.com
www.murrayc.com
www.openismus.com