[CMake] Nested variable substitution
Andy Cedilnik
andy.cedilnik at kitware.com
Thu Mar 2 14:03:27 EST 2006
Hi Andy,
Expanding "@FOO@" withing CMake list files was not intended feature and
was removed in CMake 2.2. The @FOO@ is still used for configured files.
In CMake list files you should really use ${FOO}.
Andy
andrew.blose at kodak.com wrote:
>
> FOREACH (MY_VAR FOO)
> SET(FOO_DBL_EXP "BAR")
> SET(MY_VAR_PRIME "@${MY_VAR}_DBL_EXP@")
> MESSAGE("MY_VAR_PRIME: ${MY_VAR_PRIME}")
> ENDFOREACH (MY_VAR)
>
> Maybe I'm missing something obvious but...
>
> On the windows platform, why does the previous snippet of CMAKE code
> generate:
>
> MY_VAR_PRIME: BAR
>
> with CMAKE invoked from the command line and
>
> MY_VAR_PRIME: @MY_VAR_PRIME@
>
> when invoked through CMakeSetup.exe?
--
Andy Cedilnik
Kitware Inc.
More information about the CMake
mailing list