[cmake-developers] Suggest if function has lte gte operators

Rolf Eike Beer eike at sf-mail.de
Fri Apr 8 10:42:37 EDT 2016


Am Freitag, 8. April 2016, 14:24:08 schrieb Harry Mallon:
> CMake's "if" functionality is missing greater than or equal to and less than
> or equal to. This change could be tweaked and added to provide this
> functionality to avoid things like "if(VERSION_STRING VERSION_GREATER
> "4.8.0" OR VERSION_STRING VERSION_EQUAL "4.8.0")".
> 
> Commit on github:
> https://github.com/hm1992/CMake/commit/75b318f8809ae71685cad068cd2e8ce9f19fb
> 28a
> 
> Would this be of interest for merging? I don't really have the time to do
> extensive testing on it at the moment.

The common way is to use the power of not:

LTE -> NOT GE
GTE -> NOT LE

Greetings,

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/20160408/d8018c4e/attachment.sig>


More information about the cmake-developers mailing list