<div class="gmail_quote">On Sat, Apr 18, 2009 at 4:23 PM, Andreas Pakulat <span dir="ltr"><<a href="mailto:apaku@gmx.de">apaku@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">On 18.04.09 11:24:48, Philip Lowman wrote:<br>
> On Sat, Apr 18, 2009 at 7:45 AM, Michael Jackson <<br>
> <a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>> wrote:<br>
> > On Apr 17, 2009, at 11:56 PM, Philip Lowman wrote:<br>
> > On Thu, Apr 16, 2009 at 4:27 AM, Jonatan Bijl <<a href="mailto:jonatan.bijl@tba.nl">jonatan.bijl@tba.nl</a>><br>
> >> wrote:<br>
> >> Boost_Unit_test_framework_library is not in the list.<br>
> >><br>
> >> About the filenames: these libs are the result of compiling boost 1.38.0<br>
> >> with cmake under linux. (Cmake for boost is still experimental). It might be<br>
> >> that the problem is in boost’s Cmakelists.<br>
> >><br>
> >> That is definitely a bug that needs to be fixed in Boost's experimental<br>
> >> CMake build.<br>
> >><br>
> >> If you rename the library to "libboost_unit_test_framework-mt-sd.a",<br>
> >> however, it's still not going to solve your problem.<br>
> >><br>
> >> The 's' tag is for static C++ runtime libraries and for some reason it's<br>
> >> enabled on Windows in FindBoost.cmake when you set Boost_USE_STATIC_LIBS,<br>
> >> but not on other platforms. This has always seemed a bit weird to me and<br>
> >> I've wondered why this is.<br>
> >><br>
> >> SET( _boost_STATIC_TAG "")<br>
> >> set( _boost_ABI_TAG "")<br>
> >> IF (WIN32)<br>
> >> IF(MSVC)<br>
> >> SET (_boost_ABI_TAG "g")<br>
> >> ENDIF(MSVC)<br>
> >> IF( Boost_USE_STATIC_LIBS )<br>
> >> SET( _boost_STATIC_TAG "-s")<br>
> >><br>
> >> ENDIF( Boost_USE_STATIC_LIBS )<br>
> >> ENDIF(WIN32)<br>
> >> SET (_boost_ABI_TAG "${_boost_ABI_TAG}d")<br>
> >> if(Boost_DEBUG)<br>
> >> message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}<br>
> >> ] "<br>
> >><br>
> >> "_boost_STATIC_TAG = ${_boost_STATIC_TAG}")<br>
> >> message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}<br>
> >> ] "<br>
> >> "_boost_ABI_TAG = ${_boost_ABI_TAG}")<br>
> >> endif()<br>
> >> --<br>
> >> Philip Lowman<br>
> >><br>
> >><br>
> > It is enabled on windows because Windows offers the option to statically<br>
> > linkCMake 2.6.3's to the c++ runtime. I know OS X does NOT offer that<br>
> > option. Not sure about linux.<br>
><br>
> The same variable name controls whether or not you're searching for a static<br>
> or a shared boost library, however.<br>
<br>
</div></div>Right, the reason why it only adds the "s" flag on win32 is because boost<br>
libs only have that flag on win32 for their static libraries. The reason is<br>
that on linux the static boost libs still link against the shared c<br>
runtime, while on windows they link against the static c runtime. So the<br>
variable controls wether to link against a shared or a static boost lib,<br>
which means lib<component>-<compiler>-<threading>-<version>.a on linux and<br>
similar on windows, except that here the "s" flag is needed.<br>
<br>
All this based on a normal boost installation from source, not using the<br>
experimental cmake buildsystem. If that one does it differently thats a bug<br>
in the cmake buildsystem for boost.</blockquote><div><br>I just used bjam and it happily built static libraries for win32 without the "s" flag on them.<br><br>libboost_filesystem-vc90-mt-1_38.lib<br>libboost_filesystem-vc90-s-1_38.lib <br>
libboost_filesystem-vc90-mt-s-1_38.lib<br><br>So I guess the question is how to fix FindBoost to do the right thing without breaking anyone's builds.<br></div></div><br>-- <br>Philip Lowman<br>