[CMake] Will ${string_${var}_string} work?
Alexander Neundorf
a.neundorf-work at gmx.net
Fri Sep 15 07:49:19 EDT 2006
-------- Original-Nachricht --------
Datum: Fri, 15 Sep 2006 13:32:36 +0200
Von: Francesco Montorsi <f18m_cpp217828 at yahoo.it>
An: cmake at cmake.org
Betreff: [CMake] Will ${string_${var}_string} work?
> Hi all,
> sorry I'm a cmake newbie and I need to know one thing.
>
> Is it safe to do e.g.
>
> SET( ABC_VAR_DEF "test2" )
>
> ...
>
> SET( MYVARIABLE "VAR" )
> IF( ${ABC_${MYVARIABLE}_DEF} STREQUAL "test2" )
>
> # will ABC_VAR_DEF be correctly compared with "test2" string?
> ....
>
> ?
>
> I'd like to do the ${string_${var}_string} trick in a FOREACH loop...
> I'm used to this kind of tricks in the BASH shell using eval() function
> but I'm not sure if it will work with Cmake under all platforms..
I didn't test, but I think I did such things already.
Just try it.
Alex
--
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail
More information about the CMake
mailing list