[CMake] set(a b); set(b c); if(a STREQUAL b OR a STREQUAL c) ...

Nils Gladitz nilsgladitz at gmail.com
Thu Sep 4 02:31:40 EDT 2014


On 09/04/2014 08:00 AM, Chuck Atkins wrote:
>  > But is there a way to check if the value of the variable a equals to
> "b" or "c"?
>
> Directly:
> if(a STREQUAL "b" OR a STREQUAL "c")

b is dereferenced as a variable even if it is quoted.

Nils


More information about the CMake mailing list