Feature Request/Discussion: Allow in-place list definitions in IF(<var> IN_LIST)


option(MYVAR "some myvar" TEST_VALUE1)

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.

1 Like

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