[patch] CMake utility functions

Will Stephenson wstephenson at kde.org
Wed Nov 28 09:46:29 CET 2007


On Tuesday 27 November 2007 21:49:18 Will Stephenson wrote:
> On Tuesday 27 November 2007 21:40:18 Alexander Neundorf wrote:
> > On Tuesday 27 November 2007, Will Stephenson wrote:
> > > Please review the attached patch, which adds a couple of functions to
> > > MacroEnsureVersion.cmake to test whether a version number lies in a
> > > given range.
> > >
> > > example: macro_ensure_version_range3( "0.6.5"
> > > ${NETWORKMANAGER_VERSION} "0.7.0" NM_TOO_OLD NM_TOO_NEW )
> > >
> > > The macro_ensure_version_range2 works for versions of the form "x.y".

Revised version
*) drops the separate 2-part and 3-part dotted version number variants and 
uses a regexp to tell the difference internally
*) still uses 2 as the logarithm to partition major, minor, patch version 
numbers - versions up to 99.99.99 work with this.
*) simplifies the success semantics to use a FOO_VERSION_OK set true on 
success like MACRO_ENSURE_VERSION.  - I didn't bother with the ARGN method of 
including a variable args list.
*) Moves the documentation to the top of the file. I wasn't sure about the 
right format so I imitated the other kdelibs cmake modules' documentation.  I 
don't have cmake CVS here to test doc generation as mentioned in 
http://lists.kde.org/?l=kde-buildsystem&m=119024325018579&w=2

Please CC: me as I'm not subscribed.

Will

-- 
Will Stephenson
IRC: Bille
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MacroEnsureVersion.cmake.diff.zip
Type: application/x-zip
Size: 1940 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kde-buildsystem/attachments/20071128/dbb06d1c/attachment.bin 


More information about the Kde-buildsystem mailing list