<div class="gmail_quote">On Mon, Jan 18, 2010 at 10:28 AM, Marcel Loose <span dir="ltr"><<a href="mailto:loose@astron.nl">loose@astron.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi all,<br>
<br>
Is it possible to somehow do a double @-substitution when using, e.g.,<br>
configure_file, similar to a double ${${...}} construct.<br>
<br>
$ cat myvar.cmake<br>
message(STATUS "@MYVAR@=@@MYVAR@@")<br>
message(STATUS "${MYVAR}=${${MYVAR}}")<br>
<br>
$ cmake -D MYVAR=Hello -D Hello="Hello World" -P myvar.cmake<br>
-- Hello=@Hello@<br>
-- Hello=Hello World<br>
<br>
Apparently this doesn't produce the same results.<br>
<br>
Best regards,<br>
Marcel Loose.<br></blockquote><div><br><br>No double-@ substitution, and I'm not sure it would be desirable....<br><br>But you could do something like this *before* configure_file:<br><br>set(myvar2name "${MYVAR}")<br>
set(myvar2val "${${MYVAR}}")<br>message(STATUS "@myvar2name@=@myvar2val@")<br>message(STATUS "${myvar2name}=${myvar2val}")<br><br></div></div>