[CMake] Find Boost entirely fails on test
Jean-Pierre Bergamin
james at ractive.ch
Thu Jun 18 03:42:58 EDT 2009
ariasgore at gmx.de schrieb:
> I have staticly compiled unit test lib of Boost::Test and would like to use CMake to link it static.
> But the evilness of the lib breaks somehow everyhing.
>
> I am doing sth like FIND_PACKAGE( Boost 1.39.0 COMPONENTS test)
> (with debug on)
> even if the script get the mentioned directory of my boost, it fails to detect the lib. That are the names findboost looks for:
>
> libboost_test-vc80-mt-gd-1_39
> libboost_test-vc80-mt-sgd-1_39
> libboost_test-mt-gd-1_39
> libboost_test-mt-sgd-1_39
> libboost_test-mt-gd
> libboost_test-mt-sgd
> libboost_test-gd
>
> And that is the actual name:
> libboost_unit_test_framework-vc80-mt-gd-1_39.lib
> The lib from the package test (in the directory test) is called _unit_test_framework_ and not simply _test_ (that's what find boost looks for)
>
> What can I do at this point?
>
Just use the correct name of the library component:
find_package(Boost 1.39.0 COMPONENTS unit_test_framework)
Regards
James
More information about the CMake
mailing list