Hmmm…
There might be some miss understanding.
By “expand", do you mean ${CMAKE_VAR}?
If it is, then expanding CMake variables for IN_LIST only does not work either.
It’s the double quotation marks that fix my example.
Yes, that’s what I meant.
The double Quotation is just another piece of the puzzle, which prevents premature splitting of the genex by the argument parser. Without it, after expansion of the list, the semicolons will mess things up.
Typically you want your genex quoted like that.
Why BOOL/NOT/AND/OR doesn’t need double Quotation? If the double Quotation is necessary for IN_LIST to avoid issue caused by semicolon in list, why not mention this in document or refine this defect in CMAKE source code?