[CMake] cmake - escape/delay variable expansion

Michael Hertling mhertling at online.de
Wed Jun 2 15:06:07 EDT 2010


On 06/02/2010 08:37 PM, Doug Reiland wrote:
> 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?

STRING(REPLACE "\${build-dir}" "xyz" foo "${foo}")

Regards,

Michael


More information about the CMake mailing list