like
option(MYVAR "some myvar" TEST_VALUE1)
if(MYVAR IN_LIST "TEST_VALUE1;TEST_VALUE2")
thanks for your attention.
like
option(MYVAR "some myvar" TEST_VALUE1)
if(MYVAR IN_LIST "TEST_VALUE1;TEST_VALUE2")
thanks for your attention.
I don’t think I’d like to see this. if
has enough magic behavior and even more “is it a variable name or value?” places is not something I’d like to see.
It’s also a compat hazard because if (item IN_LIST "quoted_varname")
currently uses the variable name; with this it could mean a single-item list.
Sounds reasonable, yes;
I think also that some more examples would help the IF(…) command as sometimes when I wanted to use some kind of IF subcommand, it’s not clearly understandable how I should write the code