[CMake] Version Check

Eric Noulard eric.noulard at gmail.com
Thu Sep 5 05:26:38 EDT 2013


2013/9/5 Renato Golin <renato.golin at linaro.org>:
> While searching for a version number comparison, I found a few custom
> solutions[1][2], but nothing official. Is there a canonical way of saying:
>
> IF (LIBXML2_VERSION GREATER_EQUAL 2.8.0)
>   do_something...
> END
>
> If not, which is the custom solution I should use?

Yes there is the VERSION_xxxx comparison operator:
see

cmake --help-command if



-- 
Erk
L'élection n'est pas la démocratie -- http://www.le-message.org


More information about the CMake mailing list