Hi Philip,

I've been following this thread with interest. Your solution puts the
burden on the (ignorant) end-user's shoulders. How is that poor
developer going to solve the pre/post version 1.34 issue, which is a
Boost-internal issue? In an ideal world, Boost would provide the
FindBoost.cmake file, or would generate the BoostConfig.cmake file.

Anyway, IMHO this really should be solved in FindBoost.cmake. One
possible way to make maintenance less of a burden is to define Boost's
(version-dependent) inter-dependencies once in FindBoost.cmake and let
the macro resolve these dependencies. Something like:

set(Boost_filesystem_DEPENDENCIES)
set(Boost_wave_DEPENDENCIES)
set(Boost_serialization_DEPENDENCIES filesystem)   # Just assuming
# Assume filesystem depends on system for Boost > 1.34
if(${_boost_maj}.${_boost_min} VERSION_GREATER 1.34)
  list(APPEND Boost_filesystem_DEPENDENCIES system)
endif()
# Assume wave depends on system for Boost > 1.36
if(${_boost_maj}.${_boost_min} VERSION_GREATER 1.36)
  list(APPEND Boost_wave_DEPENDENCIES system)
endif()

Does that make any sense?

Best regards,
Marcel Loose.

On Wed, 2009-11-04 at 11:14 -0500, Philip Lowman wrote:
> Mathieu, 
> 
> It's a nice idea, but given that Boost could make any one of its
> libraries dependent on "system" at any time they want in the future
> (and for all I know there are others already dependent on it, besides
> wave and filesystem), I'd rather the user be responsible for adding
> "system" manually.  It's not too hard to figure this out from the link
> errors. 
> 
> > On Nov 4, 2009 9:40 AM, "Mathieu Malaterre"
> > <mathieu.malate...@gmail.com> wrote:
> > 
> > Philip,
> > 
> >  I guess I was not very clear in my previous email. But here is my
> > proposed change:
> > 
> > @@ -322,8 +322,14 @@
> >   if(Boost_VERSION AND Boost_FIND_COMPONENTS)
> >      math(EXPR _boost_maj "${Boost_VERSION} / 100000")
> >      math(EXPR _boost_min "${Boost_VERSION} / 100 % 1000")
> > -     if(${_boost_maj}.${_boost_min} VERSION_LESS 1.35)
> > -       list(REMOVE_ITEM Boost_FIND_COMPONENTS system)
> > +     if(${_boost_maj}.${_boost_min} VERSION_GREATER 1.34)
> > +       # when use asked for filesystem or wave, automatically add
> > +       # system to the list of components
> > +       list(FIND Boost_FIND_COMPONENTS filesystem v1)
> > +       list(FIND Boost_FIND_COMPONENTS wave v2)
> > +       if(v1 OR v2)
> > +         list(APPEND Boost_FIND_COMPONENTS system)
> > +       endif(v1 OR v2)
> >      endif()
> >   endif()
> > 
> > 
> > Therefore calling
> > 
> > 
> > FIND_PACKAGE ( Boost COMPONENTS filesystem REQUIRED)
> > 
> > will work on boost 1.34 and boost > 1.34
> > 
> > Comments ?
> > 
> > On Tue, Nov 3, 2009 at 3:20 PM, Mathieu Malaterre
> > 
> > 
> > <mathieu.malate...@gmail.com> wrote: > The way I see it to address
> > is that 'system' is an internal d...
> > 
> > --
> > Mathieu
> 
> _______________________________________________
> 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

_______________________________________________
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

Reply via email to