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

Brad King brad.king at kitware.com
Fri Apr 8 10:49:12 EDT 2016


On 04/08/2016 10:24 AM, Harry Mallon wrote:
> "if(VERSION_STRING VERSION_GREATER "4.8.0" OR VERSION_STRING VERSION_EQUAL "4.8.0")".

As others have said this can be done with

    if(NOT version VERSION_LESS 4.8.0)

> Commit on github:
> https://github.com/hm1992/CMake/commit/75b318f8809ae71685cad068cd2e8ce9f19fb28a

I don't think we have a strong use case for the proposed operators,
but I've taken a small cleanup from that commit:

 cmConditionEvaluator: Use pre-allocated keywords in more places
 https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=aff4a5fa

Thanks,
-Brad



More information about the cmake-developers mailing list