With multiple versions installed, setting the BOOST_ROOT variable will
force the FindBoost module to search the desired location first. Turning the loop inside out wouldn't really solve the problem when multiple libraries are searched for (date_time, thread). The problem arises when multiple versions are available with different capabilities. For example: boost installed in /usr/local has all the libraries available but the one installed in /home/myuser/projects/boost-1.41.0 might only have a partial subset of the libraries available, say only date_time and thread for example. Since the FindBoost module searches the BOOST_ROOT path in addition to the other paths, a conflict could arise where the module finds something like:<br>
<br>/home/myuser/projects/boost-1.41.0/lib/libboost_date_time-mt.so<br>
/home/myuser/projects/boost-1.41.0/lib/libboost_thread-mt.so<br>
/usr/local/lib/libboost_filesystem-mt.so<br>
/usr/local/lib/libboost_python-mt.so<br>
<br>This mix and match is definitely not desired. It almost seems like if the BOOST_ROOT variable is set then that should get used exclusively as the search path and not just appended to the front.<br><br>Thoughts?<br><br clear="all">
Chuck Atkins<br><br><br><div class="gmail_quote">On Fri, Mar 19, 2010 at 7:12 AM, Marcel Loose <span dir="ltr"><<a href="mailto:loose@astron.nl">loose@astron.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hi Michael,<br>
<br>
That still doesn't answer my question about turning that loop inside<br>
out.<br>
<br>
A quick grep in the CMake Modules directory showed me that there are at<br>
least a dozen other FindXXX scripts that use multiple NAMES with a<br>
FIND_XXX() commands. I haven't checked how they handle default (system)<br>
paths, but I guess these might be erratic as well, when multiple<br>
versions of a package exists with libraries named slightly different.<br>
<br>
Best regards,<br>
<font color="#888888">Marcel Loose.<br>
</font><div><div></div><div class="h5"><br>
On Fri, 2010-03-19 at 06:50 -0400, Philip Lowman wrote:<br>
> Someone could add an option to FindBoost that will simply exclude the<br>
> system paths from the search. This has never been implied by setting<br>
> BOOST_ROOT. As long as the unversioned library names are being<br>
> searched for with find_library they are likely going to be found.<br>
> Currently the onus is on the user to double check what FindBoost<br>
> discovers.<br>
><br>
> > On Mar 19, 2010 4:56 AM, "Marcel Loose" <<a href="mailto:loose@astron.nl">loose@astron.nl</a>> wrote:<br>
> ><br>
> > Well, in my case, the library name was not even that specific.<br>
> > It found /usr/lib/libboost_date_time-mt.so<br>
> > before /home/loose/boost/boost-1.40.0/lib/libboost_date_time.so,<br>
> > simply<br>
> > because libboost_date_time-mt.so is searched for in *all* paths<br>
> > before<br>
> > libboost_date_time.so.<br>
> ><br>
> > Anyway, I still think this is (also) a CMake issue. IMHO it would<br>
> > make<br>
> > sense to turn the loop in cmFindLibraryCommand::FindNormalLibrary()<br>
> > inside out. What's your opinion?<br>
> ><br>
> > Best regards,<br>
> > Marcel Loose.<br>
> ><br>
> ><br>
> > On Thu, 2010-03-18 at 10:05 -0400, Michael Jackson wrote: > I<br>
> > thought there was now an option the b...<br>
> ><br>
><br>
<br>
<br>
</div></div><div><div></div><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br>