Why doesn’t the following command work?
SET(MY_LIST a b c d)
LIST(GET ${MY_LIST} 0 HEAD)
MESSAGE("HEAD = ${HEAD}")
I want it to assign a to HEAD but instead I’m getting NOTFOUND.
I have already tried surrounding ${MY_LIST} with double quotes and changing the index to 1 instead of 0 (don’t know why someone would do that but it didn’t hurt to try).
The list commands require an unsubstituted variable as the second argument, i.e.: