[CMake] COMPARE_VERSION_STRINGS

James Bigler bigler at cs.utah.edu
Mon Sep 24 13:43:30 EDT 2007


I wrote up a page on the wiki about a new macro I wrote that allows you compare 
version strings directly rather than converting them to a single number for 
comparisons.

http://www.cmake.org/Wiki/CMakeCompareVersionStrings

You can compare versions with any number of dot versions.  If version strings 
have different numbers of dot versions, the shorter version is padded with 
zeros.  This allows you to properly compare number such as 0.99 and 0.99.1.

Take a look and let me know what you think.  I think this could be a fairly 
useful macro.

Thanks,
James


More information about the CMake mailing list