Boost logo

Boost :

From: Larry Evans (cppljevans_at_[hidden])
Date: 2007-08-17 06:31:13


On 08/16/2007 09:58 AM, Larry Evans wrote:
> On 08/16/2007 08:11 AM, Larry Evans wrote:
[snip]
> I just turned all the options to "ON" and ran make. No tests were
> run. I reread:
>
> http://svn.boost.org/trac/boost/wiki/CMakeTesting
>
> which, of course, clearly implied the ctest had to be used to run the

The following comments:

# makefiles. Use "make" to build, "make test" to test, "make #
# install" to install, and "make package" to build binary #

in the top-level CMakeLists.txt indicate that last conclusion
about having to run ctest is wrong. I tried `make test` and
the output, indeed, showed test drivers were being compiled.
However, I had done a `make clean` and turned every BUILD_BOOST_library
option in CMakeCache.txt OFF. Now, as reported previously, it's
not finding the libraries. At first, it couldn't find the
unit_test_framework library:

[ 5%] Built target boost_iostreams-shared
Linking CXX executable ../../../bin/tests/iostreams/array_test
/usr/bin/ld: cannot find -lboost_unit_test_framework-shared
collect2: ld returned 1 exit status

However, after turning that ON, I got:

/usr/lib/gcc/i486-linux-gnu/4.1.2/../../../../lib/crt1.o: In function
`_start':
../sysdeps/i386/elf/start.S:115: undefined reference to `main'
collect2: ld returned 1 exit status

So then I tried:

BUILD_STATIC:BOOL=ON

and this got further:

Linking CXX executable ../../../bin/tests/iostreams/regex_filter_test
/usr/bin/ld: cannot find -lboost_regex-static
collect2: ld returned 1 exit status
make[2]: *** [bin/tests/iostreams/regex_filter_test] Error 1
make[1]: *** [libs/iostreams/test/CMakeFiles/regex_filter_test.dir/all]
Error 2
make: *** [all] Error 2

So I looked at the iostreams test/Jamfile.v2 which showed
regex_filter_test requiring boost_regex:

           [ test-iostreams
                 regex_filter_test.cpp
                 /boost/regex//boost_regex ]

The corresponding line in iostreams test/CMakeLists.txt has:

boost_test_run(regex_filter_test
   DEPENDS boost_unit_test_framework boost_regex
   COMPILE_FLAGS "-DBOOST_IOSTREAMS_NO_LIB")

but, apparently, the DEPENDS in the above boost_test_run macro
call does not cause boost_regex library to be built and loaded
to create the iostreams regex_filter_test.

Anyone have any suggestions about how to solve this?

TIA.

-regards,
Larry
[snip]


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk