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

Andreas Pakulat apaku at gmx.de
Thu Apr 9 08:31:14 EDT 2009


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.

Andreas
 
-- 
You learn to write as if to someone else because NEXT YEAR YOU WILL BE
"SOMEONE ELSE."


More information about the CMake mailing list