[CMake] Boost_ADDITIONAL_VERSIONS works not correctly

Rolf Eike Beer eike at sf-mail.de
Tue Jan 31 08:15:25 EST 2012


> find_package(Boost COMPONENTS ${GGMCONTROL_BOOST_COMPONENTS} REQUIRED)
> if(NOT Boost_FOUND)
>     # Try again with the other type of libs
>     set(Boost_USE_STATIC_LIBS NOT ${Boost_USE_STATIC_LIBS})
>     find_package(Boost COMPONENTS ${GGMCONTROL_BOOST_COMPONENTS} QUIET)
> endif()

This has nothing to do with your problem, but this is wrong. Since you put
in REQUIRED CMake will return with an error from the configuration stage.
So the if() clause doesn't really have any effect.

Eike


More information about the CMake mailing list