Part of the problem is that it's not clear if the user has built boost-thread against pthreads or win32 threads. See the fix for #11121, I've added a variable to control which threading library gets used if the user crosscompiles boost-thread using a thread-api that isn't native on their system. <a href="http://www.cmake.org/Bug/view.php?id=11121">http://www.cmake.org/Bug/view.php?id=11121</a><div>
<br></div><div><a href="http://www.cmake.org/Bug/view.php?id=11121"></a>Maybe we can just require users to specify pthreads for this and when they do we could link to pthreads? But is this regular pthreads or pthreads-win32 we're talking about? Really we need to fix 6399 first.</div>
<div><br></div><div>For now I would just recommend adding the target_link_library manually against pthreads when you're using it and ensure we have a bug filed for this issue in the tracker.</div><div><div><br><div class="gmail_quote">
On Fri, Sep 10, 2010 at 1:29 PM, Matthew Woehlke <span dir="ltr"><<a href="mailto:matthew.woehlke@kitware.com">matthew.woehlke@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On 09/10/2010 09:02 AM, Philip Lowman wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi everyone,<br>
I'm volunteering to become the primary maintainer of FindBoost.cmake.<br>
</blockquote>
<br></div>
First off, thank you for volunteering!<br>
<br>
I hope I will not frighten you off with a request so soon :-). I've run into a couple boost-using projects lately that fail to build because they use pthread (often via boost templates), but don't explicitly link pthread. (I think previously this was not an issue due to indirect linking, i.e. MyProject links to boost which links to pthread, therefore MyProject can use pthread. However, Fedora now disallows this sort of linking, such that MyProject must link pthread itself - I believe this is an early-adoption of new upstream practice.)<br>
<br>
Given how template-heavy boost is, I'm thinking the best solution is for Boost_LIBRARIES to include pthread, rather than such projects needing to find_package(threads) and link_libraries the libraries therefrom.<br>
<br>
What do you think? Any advice how to proceed patching FindBoost.cmake?<br>
<br>
-- <br><font color="#888888">
Matthew<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Philip Lowman<br>
</div></div>