[CMake] cmake - escape/delay variable expansion

Doug Reiland dreiland at gmail.com
Wed Jun 2 14:37:53 EDT 2010


Sorry for another newbie question.

Say, to setup a variable as follow so ${build-dir} doesn't get expanded
set(foo \${build-dir}/foo.c)

How would a expand foo so ${build-dir} gets expanded?

The following don't seem to do it.

message(${foo})
message(${${foo}})


More information about the CMake mailing list