[cmake-developers] New EVIS parser moving forward (3.1)

Brad King brad.king at kitware.com
Fri Feb 21 17:55:59 EST 2014


On 2/21/2014 5:37 PM, Ben Boeckel wrote:
> That also means I can't protect my code from things like:
> 
>     set(evil "" STREQUAL bogus OR TRUE OR "")
>     if (PREFIX_${evil}_SUFFIX)
>         message("Evil prevails")
>     endif ()
> 
> by quoting the 'evil' expansion

We already agreed not to change the basic if(var) case,
and with quoting protection you can do

 if("${PREFIX_${evil}_SUFFIX}")

to test if the so-called variable has a non-false value.

-Brad



More information about the cmake-developers mailing list