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...<div><br></div><div>Are you reporting this based on CMake 2.8.3-rc2 or an earlier release of CMake?</div>
<div><br></div><div>Try using the release candidate. I know he did some stuff to make it possible to prefer static libs specifically.</div><div><br></div><div><br></div><div>Thanks,</div><div>David</div><div><br><br><div class="gmail_quote">
On Wed, Oct 6, 2010 at 7:55 PM, assume_R <span dir="ltr"><<a href="mailto:assurem@gmail.com">assurem@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hey all. So I noticed a possible bug with the way boost is searched in findboost.cmake.<div><br></div><div>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*</div>
<div><br></div><div>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.</div><div><br></div><div>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. </div>
<div><br></div><div>So what needs to be done is instead of </div><div><br></div><div><div> FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE</div><div><span style="white-space:pre-wrap">                        </span> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}</div>
<div> NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}</div><div> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}</div>
<div> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}</div><div> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}</div><div> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}</div>
<div> ${Boost_LIB_PREFIX}boost_${COMPONENT}</div><div> HINTS ${_boost_LIBRARIES_SEARCH_DIRS}</div><div> )</div></div><div><br></div><div><br></div><div><br></div><div>it should be </div><div><br>
</div>
<div><br></div><div><div><br></div><div> FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE</div><div> NAMES ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}</div>
<div><span style="white-space:pre-wrap">                        </span> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}</div><div> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}</div>
<div> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}</div><div> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}</div><div> ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}</div>
<div> ${Boost_LIB_PREFIX}boost_${COMPONENT}</div><div> HINTS ${_boost_LIBRARIES_SEARCH_DIRS}</div><div> )</div></div><div><br></div><div>Anybody know who the maintainer is??</div><div><br></div><div>
-assumeR</div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br></blockquote></div><br></div>