What's the CMake syntax to set and use variables?

前端 未结 3 1579
情话喂你
情话喂你 2020-11-22 11:51

I\'m asking this as a reminder to myself the next time I use CMake. It never sticks, and Google results aren\'t great.

What\'s the syntax to set and use variables in

3条回答
  •  遥遥无期
    2020-11-22 12:20

    $ENV{FOO} for usage, where FOO is being picked up from the environment variable. otherwise use as ${FOO}, where FOO is some other variable. For setting, SET(FOO "foo") would be used in CMake.

提交回复
热议问题