On Fri, Jan 09, 2015 at 20:18:25 +0100, Rolf Eike Beer wrote:
> Matthew Woehlke wrote:
> > On 2014-10-03 03:35, Rolf Eike Beer wrote:
> > > find_package(foo 2.0 EXACT) means EXACT, i.e. only "2.0" is allowed. In
> > > most cases this behavior is not the one that one would expect or need.
> > > Most people would instead allow any 2.0.x version to match. This sort of
> > > selection is currently impossible without additional effort in every
> > > Find*.cmake that is used.
> >
> > This is probably a bit late, but did anyone think of using "MATCHES" to
> > say "all provided components match exactly and the rest can be whatever"?
>
> I bet everybody will get it wrong.
>
> Ok, this is "version 2.1 and any of it's patch versions", if _I_ got it right:
>
> if (VER MATCHES "^2\\.1(\\..*|[^0-9].*)?$")
>
> So this should match "2.1", "2.1a", "2.1.1", but not "2.10". What combination
> of stuff did I miss?
What about "VERSION_RANGE 2.1 2.2" which is interpreted as a half-open
range? Should be easier with:
NOT ver VERSION_LESS low AND ver VERSION_LESS high
--Ben
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers