[cmake-developers] Improving the version selection behavior of EXACT

Rolf Eike Beer eike at sf-mail.de
Mon Oct 6 16:04:09 EDT 2014


Brad King wrote:
> On 10/03/2014 12:47 PM, Rolf Eike Beer wrote:
> > +          # give an exact match if the first ${NAME}_FIND_VERSION_COUNT
> > components of the version string match +          # this constructs the
> > equivalent of "(([^.]\\.){${${_NAME}_FIND_VERSION_COUNT}})" +         
> > unset(_VERSION_REGEX)
> > +          # foreach(RANGE) doesn't like it if stop is greater start
> > +          if (${${_NAME}_FIND_VERSION_COUNT} GREATER 1)
> > +            foreach (_NUM RANGE 2 ${${_NAME}_FIND_VERSION_COUNT})
> > +              set(_VERSION_REGEX "${_VERSION_REGEX}[^.]*\\.")
> > +            endforeach ()
> > +          endif ()
> 
> Since _FIND_VERSION_COUNT is always [0-4], I think a hand-coded lookup
> table may be simpler and faster.

Topic FPHSA_exact_version pushed to next.

Eike
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20141006/1aab89fa/attachment-0002.sig>


More information about the cmake-developers mailing list