[CMake] FIND_LIBRARY in FindBoost finds wrong library
Marcel Loose
loose at astron.nl
Fri Mar 19 04:56:07 EDT 2010
Well, in my case, the library name was not even that specific.
It found /usr/lib/libboost_date_time-mt.so
before /home/loose/boost/boost-1.40.0/lib/libboost_date_time.so, simply
because libboost_date_time-mt.so is searched for in *all* paths before
libboost_date_time.so.
Anyway, I still think this is (also) a CMake issue. IMHO it would make
sense to turn the loop in cmFindLibraryCommand::FindNormalLibrary()
inside out. What's your opinion?
Best regards,
Marcel Loose.
On Thu, 2010-03-18 at 10:05 -0400, Michael Jackson wrote:
> I thought there was now an option the boost build system to NOT add
> all the "very specific" naming of each library which is now the
> default. There is a way to turn that back on. You will have to search
> through the boost-build docs for that info.
>
> ___________________________________________________________
> Mike Jackson www.bluequartz.net
> Principal Software Engineer mike.jackson at bluequartz.net
> BlueQuartz Software Dayton, Ohio
>
>
> On Mar 18, 2010, at 9:47 AM, Marcel Loose wrote:
>
> > Hi all,
> >
> > I ran into a problem with FindBoost where it fails to find the
correct
> > version of a component library. The cause is pretty clear to me.
> >
> > There's a system-wide (rather old) version of Boost installed and
> > there's my latest-greatest version of Boost. The FindBoost macro
> > searches for a library using rather specific names first and generic
> > names last. These are all listed under NAMES. FIND_LIBRARY() tries
to
> > find each name in all paths specified under PATHS.
> >
> > Problem is that (for reasons I do not really know) the very specific
> > library name is not present in my latest-greatest directory, but it
IS
> > present in /usr/lib.
> >
> > This problem is closely related to a post on this list a couple of
> > months ago:
http://www.mail-archive.com/cmake@cmake.org/msg24565.html
> > Unfortunately, no-one ever replied to that post.
> >
> > Basically, the author of that post suggested to turn the loop in
> > cmFindLibraryCommand::FindNormalLibrary() inside out: i.e.
> > for(path in paths)
> > {
> > for(name in names)
> > {
> > find name in path;
> > if found return name;
> > }
> > }
> >
> > Any thoughts on this?
> >
> > Best regards,
> > Marcel Loose.
> >
> > _______________________________________________
> > Powered by www.kitware.com
> >
> > Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
> >
> > Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.cmake.org/mailman/listinfo/cmake
>
More information about the CMake
mailing list