[CMake] findBoost says it finds static unit testing libraries, but does not set them

Philip Lowman philip at yhbt.com
Wed Apr 15 22:46:04 EDT 2009


On Thu, Apr 9, 2009 at 8:31 AM, Andreas Pakulat <apaku at gmx.de> wrote:

> On 09.04.09 12:49:09, Jonatan Bijl wrote:
> > I've compiled the static versions of the boost libraries. When I use
> > findBoost to detect the unit_test_framework, it gives the following
> > message:
>
> Try to run cmake --trace to find out more...
>
> > But the variables Boost_UNIT_TEST_FRAMEWORK_LIBRARY_DEBUG and
> > Boost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE are not found.
>
> What about BoosT_UNIT_TEST_FRAMEWORK_LIBRARY, is that one set? The
> DEBUG/RELEASE variables are only set (IIRC) when both debug and release
> libs are being found.
>
> > I have set the additional-versions and use-static-libs flags before
> > calling find_package
> >
> > I guess it has to do with the -s suffix the library files have
> > (libboost_unit_test_framework-mt-d-s.a)
>
> If you look at FindBoost.cmake it already adds the -s when using static
> libs on win32. However it seems it expects -s-d.a and not -d-s.a. That
> may be the bug. Also FindBoost.cmake doesn't use -d, its just "d" there
> (and potentially g too). So it searches for <component>-mt-s followed by
> either d, gd without a dash in between. At least my cmake 2.6.3 rc7 does
> that.


I'm a bit confused.  The Boost documentation succinctly states that the
generated filenames have one ABI tag.

"For example, if you build a debug version of your code for use with debug
versions of the static runtime library and the STLPort standard library in
“native iostreams” mode, the tag would be: -sgdpn."
http://www.boost.org/doc/libs/1_38_0/more/getting_started/windows.html#library-naming

Where did you find "libboost_unit_test_framework-mt-d-s.a"?  What version of
Boost is this?  Did you build it yourself or was it packaged somewhere?

ABI tags definitely need to be reworked in FindBoost regardless of where
this thread leads.


-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090415/4718e0ec/attachment-0001.htm>


More information about the CMake mailing list