[Cmake] IF statement in CMake

William A. Hoffman bill.hoffman at kitware.com
Wed Nov 28 06:45:19 EST 2001


There is currently no < in the IF.   You might be able to use the MATCH in 
the IF.
The MATCH is a regular expression matcher.

-Bill


At 03:16 PM 11/26/2001 -0500, Asad A. Abu-Tarif wrote:
>Hi,
>I started using CMake to control the compilation of my
>registration package (that uses vtk heavily).
>In my package, I'm supporting several vtk versions.
>In my CMakeLists files, I added a value for VTK_VERSION
>using:
>SET (VTK_VERSION 3.2 CACHE VALUE "VTK version" )
>
>Now, I would like to use a statement like:
>IF (VTK_VERSION < 3.2)
>     do some things
>ELSE ....etc.
>
>It seems that IF doesn't accept the 'less than' expression.
>
>Is something like this doable in CMake??
>
>Sorry if this is a repeated question.
>Regards,
>Asad
>        __________________________________________________
>      /                        Asad A. Abu-Tarif
>\
>      |   Computer Engineering.
>|
>      |   PhD Candidate, Rensselaer Polytechnic Institute (RPI).       |
>      |   tarifa at rpi.edu
>|
>      \___________________________________________________/
>
>
>_______________________________________________
>Cmake mailing list
>Cmake at public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake




More information about the CMake mailing list