[CMake] FindBoost.cmake: please test

Miguel A. Figueroa-Villanueva miguelf at ieee.org
Sun Jan 20 13:02:32 EST 2008


On Jan 19, 2008 7:14 PM, Andreas Schneider wrote:
> Andreas Pakulat wrote:
> > apparently the FindBoost.cmake I attached to
> > http://www.cmake.org/Bug/view.php?id=6257
> >
> > isn't quite perfect - actually not even close. The last few days I've
> > worked with Andreas Schneider to make it work on his and my own system.
> >
> > However thats just two, I'd like to get some more testing feedback from
> > people with other linux distro's (other than debian and opensuse), as
> > well as people installing boost from source and of course other
> > platforms.
>
> it would be great if we could get testing for Windows and MacOSX too. Both
> systems should work in addition.
>
> Patches are welcome.

Well, first of all, thanks to both of you, Andreas, and all the others
that have pitched in. I think this is a valuable contribution to the
Find* modules.

Right now I'm quite busy and when I get a chance I need to focus on
some changes/updates to the eclipse generator for cmake, but then I'll
give it a shot at testing in a windows platform. However, I encourage
anyone to try it out before I do, since I might take a while.

I have tried to keep up with the threads on the FindBoost, but I might
have missed something... so, if the following has already been
discussed, I apologize up front.

I guess there has been some difficulties with the boost version
number. My suggestion would be to use a directory that includes the
version number and extract it from there (e.g., boost_include_dir -
.../include/boost-X.YY). Then you could just have a find_path that
looks for that dir, having a list of version numbers like:

find_path(boost_include_dir version.hpp
  PATHS
    C:/boost/include
    /sw/local/include
  PATH_SUFFIXES
    boost-1.34.1 boost-1_34_1
    boost-1.34.0 boost-1_34_0
    boost-1.34    boost-1_34
    boost-1.33.1 boost-1_33_1
    boost-1.33.0 boost-1_33_0
    boost-1.33    boost-1_33
  )

This way it finds the latest available boost version, and allows the
user to specify a different one simply by selecting a different dir
for the boost_include_dir.

Of course, you'd need to detect changes in the boost_include_dir to
reset all the previously found libraries by setting them to NOT_FOUND.
I do this for the FindwxWidgets.cmake.

Let me know if this makes sense or if I just completely missed the point.

Thanks again,
--Miguel


More information about the CMake mailing list