On Mon, 2010-01-18 at 11:55 -0500, David Cole wrote: > On Mon, Jan 18, 2010 at 10:28 AM, Marcel Loose <lo...@astron.nl> > wrote: > Hi all, > > Is it possible to somehow do a double @-substitution when > using, e.g., > configure_file, similar to a double ${${...}} construct. > > $ cat myvar.cmake > message(STATUS "@my...@=@@MYVAR@@") > message(STATUS "${MYVAR}=${${MYVAR}}") > > $ cmake -D MYVAR=Hello -D Hello="Hello World" -P myvar.cmake > -- hel...@hello@ > -- Hello=Hello World > > Apparently this doesn't produce the same results. > > Best regards, > Marcel Loose. > > > No double-@ substitution, and I'm not sure it would be desirable.... > > But you could do something like this *before* configure_file: > > set(myvar2name "${MYVAR}") > set(myvar2val "${${MYVAR}}") > message(STATUS "@myvar2n...@=@myvar2val@") > message(STATUS "${myvar2name}=${myvar2val}") > > Yeah, that's what I was using as a "work-around". Guess I'll have to stick to that. Thanks.
Regards, Marcel Loose. _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake