On Sun, May 23, 2010 at 10:31 AM, Clark Gaebel <span dir="ltr">&lt;<a href="http://cg.wowus.cg">cg.wowus.cg</a>@<a href="http://gmail.com">gmail.com</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">






<div text="#000000" bgcolor="#ffffff">

<span style="border-collapse:separate;color:rgb(0, 0, 0);font-family:Helvetica;font-size:14px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="border-collapse:collapse;font-family:Arial,&#39;Liberation Sans&#39;,&#39;DejaVu Sans&#39;,sans-serif;font-size:12px;line-height:15px;text-align:left">
<p style="border-width:0px;margin:0px 0px 1em;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">When
I link Boost.Thread to my boost_test executable, it gives me</p>
<pre style="border-width:0px;margin:0px 0px 10px;padding:5px;overflow:auto;font-size:12px;vertical-align:baseline;background-color:rgb(238, 238, 238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;width:auto;max-height:600px">
<code style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:rgb(238, 238, 238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif"><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">make</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">[</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:maroon">2</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">]:</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black"> </span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">***</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black"> </span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:rgb(43, 145, 175)">No</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black"> rule to make target </span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:maroon">`/usr/lib64/libboost_thread-mt.so&#39;, needed by `</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">gogo</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">/</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">test</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">/</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">test_boost</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:maroon">&#39;.  Stop.
</span></code></pre>
<p style="border-width:0px;margin:0px 0px 1em;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;clear:both;word-wrap:break-word">when
I<span> </span><code style="border-width:0px;margin:0px;padding:1px 5px;font-size:12px;vertical-align:baseline;background-color:rgb(238, 238, 238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif">make</code><span> </span>it. Here&#39;s the offending CMake
code, what am I doing wrong?</p>
<pre style="border-width:0px;margin:0px 0px 10px;padding:5px;overflow:auto;font-size:12px;vertical-align:baseline;background-color:rgb(238, 238, 238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif;width:auto;max-height:600px">
<code style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:rgb(238, 238, 238);font-family:Consolas,Menlo,Monaco,&#39;Lucida Console&#39;,&#39;Liberation Mono&#39;,&#39;DejaVu Sans Mono&#39;,&#39;Bitstream Vera Sans Mono&#39;,&#39;Courier New&#39;,monospace,serif"><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">add_executable</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">(</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">boost_test boost_test</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">.</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">cpp</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">)</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">
add_test</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">(</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">boost_test boost_test</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">)</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">

</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:gray"># Boost auto-links for MSVC, so we exclude it.</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">
</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:rgb(0, 0, 139)">if</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">(</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">CMAKE_COMPILER_IS_GNUCXX</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">)</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">
    target_link_libraries</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">(</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">test_boost </span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:gray">#LINK_INTERFACE_LIBRARIES</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">
        $</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">{</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:rgb(43, 145, 175)">Boost_THREAD_LIBRARY</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">}</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">
    </span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">)</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">
endif</span><span style="border-width:0px;margin:0px;padding:0px;font-size:12px;vertical-align:baseline;background-color:transparent;color:black">()</span></code></pre></span></span></div></blockquote><div>Don&#39;t you want:</div>
<div>target_link_libraries(boost_test ${Boost_THREAD_LIBRARY})</div><div>instead of &quot;test_boost&quot;?</div><div><br></div></div>-- <br>Philip Lowman<br>