[CMake] Boost Library Search
David Cole
david.cole at kitware.com
Wed Oct 6 20:02:15 EDT 2010
Philip Lowman recently took the mantle for the FindBoost maintenance. He
fixed a bunch of stuff just now for the upcoming (now in release candidate
phase) CMake 2.8.3 release...
Are you reporting this based on CMake 2.8.3-rc2 or an earlier release of
CMake?
Try using the release candidate. I know he did some stuff to make it
possible to prefer static libs specifically.
Thanks,
David
On Wed, Oct 6, 2010 at 7:55 PM, assume_R <assurem at gmail.com> wrote:
> Hey all. So I noticed a possible bug with the way boost is searched in
> findboost.cmake.
>
> Essentially, if you have the boost static runtimes installed, that's what
> Visual Studio will require. For example, using the thread library, it will
> need libboost_thread*-sgd*
>
> Yet the non-static-runtime versions are what are searched first, so it only
> finds libboost_thread*-gd*, and visual studio will give you a link error.
>
> The reason is that on lines 718 - 738 of findboost.cmake, it defines the
> NAMES of the boost_STATIC_TAG after it already lists the same version
> without the boost_STATIC_TAG.
>
> So what needs to be done is instead of
>
> FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
>
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
> NAMES
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
>
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
>
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
>
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}
> ${Boost_LIB_PREFIX}boost_${COMPONENT}
> HINTS ${_boost_LIBRARIES_SEARCH_DIRS}
> )
>
>
>
> it should be
>
>
>
> FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
> NAMES
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
>
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
>
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
>
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
>
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}
> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
> ${Boost_LIB_PREFIX}boost_${COMPONENT}
> HINTS ${_boost_LIBRARIES_SEARCH_DIRS}
> )
>
> Anybody know who the maintainer is??
>
> -assumeR
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101006/f020f21b/attachment.htm>
More information about the CMake
mailing list