<div class="gmail_quote">On Sat, Apr 18, 2009 at 4:23 PM, Andreas Pakulat <span dir="ltr">&lt;<a href="mailto:apaku@gmx.de">apaku@gmx.de</a>&gt;</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>
&gt; On Sat, Apr 18, 2009 at 7:45 AM, Michael Jackson &lt;<br>
&gt; <a href="mailto:mike.jackson@bluequartz.net">mike.jackson@bluequartz.net</a>&gt; wrote:<br>
&gt; &gt; On Apr 17, 2009, at 11:56 PM, Philip Lowman wrote:<br>
&gt; &gt;  On Thu, Apr 16, 2009 at 4:27 AM, Jonatan Bijl &lt;<a href="mailto:jonatan.bijl@tba.nl">jonatan.bijl@tba.nl</a>&gt;<br>
&gt; &gt;&gt; wrote:<br>
&gt; &gt;&gt; Boost_Unit_test_framework_library is not in the list.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; About the filenames: these libs are the result of compiling boost 1.38.0<br>
&gt; &gt;&gt; with cmake under linux. (Cmake for boost is still experimental). It might be<br>
&gt; &gt;&gt; that the problem is in boost’s Cmakelists.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; That is definitely a bug that needs to be fixed in Boost&#39;s experimental<br>
&gt; &gt;&gt; CMake build.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; If you rename the library to &quot;libboost_unit_test_framework-mt-sd.a&quot;,<br>
&gt; &gt;&gt; however, it&#39;s still not going to solve your problem.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; The &#39;s&#39; tag is for static C++ runtime libraries and for some reason it&#39;s<br>
&gt; &gt;&gt; enabled on Windows in FindBoost.cmake when you set Boost_USE_STATIC_LIBS,<br>
&gt; &gt;&gt; but not on other platforms.  This has always seemed a bit weird to me and<br>
&gt; &gt;&gt; I&#39;ve wondered why this is.<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt; SET( _boost_STATIC_TAG &quot;&quot;)<br>
&gt; &gt;&gt;  set( _boost_ABI_TAG &quot;&quot;)<br>
&gt; &gt;&gt;  IF (WIN32)<br>
&gt; &gt;&gt;    IF(MSVC)<br>
&gt; &gt;&gt;      SET (_boost_ABI_TAG &quot;g&quot;)<br>
&gt; &gt;&gt;    ENDIF(MSVC)<br>
&gt; &gt;&gt;    IF( Boost_USE_STATIC_LIBS )<br>
&gt; &gt;&gt;      SET( _boost_STATIC_TAG &quot;-s&quot;)<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;    ENDIF( Boost_USE_STATIC_LIBS )<br>
&gt; &gt;&gt;  ENDIF(WIN32)<br>
&gt; &gt;&gt;  SET (_boost_ABI_TAG &quot;${_boost_ABI_TAG}d&quot;)<br>
&gt; &gt;&gt;  if(Boost_DEBUG)<br>
&gt; &gt;&gt;    message(STATUS &quot;[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}<br>
&gt; &gt;&gt; ] &quot;<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;      &quot;_boost_STATIC_TAG = ${_boost_STATIC_TAG}&quot;)<br>
&gt; &gt;&gt;    message(STATUS &quot;[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE}<br>
&gt; &gt;&gt; ] &quot;<br>
&gt; &gt;&gt;      &quot;_boost_ABI_TAG = ${_boost_ABI_TAG}&quot;)<br>
&gt; &gt;&gt;  endif()<br>
&gt; &gt;&gt; --<br>
&gt; &gt;&gt; Philip Lowman<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;<br>
&gt; &gt; It is enabled on windows because Windows offers the option to statically<br>
&gt; &gt; linkCMake 2.6.3&#39;s to the c++ runtime. I know OS X does NOT offer that<br>
&gt; &gt; option. Not sure about linux.<br>
&gt;<br>
&gt; The same variable name controls whether or not you&#39;re searching for a static<br>
&gt; or a shared boost library, however.<br>
<br>
</div></div>Right, the reason why it only adds the &quot;s&quot; 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&lt;component&gt;-&lt;compiler&gt;-&lt;threading&gt;-&lt;version&gt;.a on linux and<br>
similar on windows, except that here the &quot;s&quot; 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 &quot;s&quot; 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&#39;s builds.<br></div></div><br>-- <br>Philip Lowman<br>