[cmake-developers] Alternate if() without implicit variable expansion

David Cole dlrdave at aol.com
Thu Sep 4 10:32:54 EDT 2014


Another approach might be to add STRING_EQUAL and STRING_MATCHES (or
similarly unambiguous names) operators that do not do the variable
lookup.

The documentation would start with:
if(<string> STRING_EQUAL <string>)
if(<string> STRING_MATCHES <regex>)
...i.e., not mentioning <variable> anywhere for these operators.


D





More information about the cmake-developers mailing list