Cmake list-get command

前端 未结 1 688
伪装坚强ぢ
伪装坚强ぢ 2021-01-01 09:26

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 <

相关标签:
1条回答
  • 2021-01-01 10:25

    The list commands require an unsubstituted variable as the second argument, i.e.:

    set (MY_LIST a b c d)
    list (GET MY_LIST 0 HEAD)
    message ("HEAD = ${HEAD}") 
    
    0 讨论(0)
提交回复
热议问题