[CMake] CMP0053: Unable to refer to $ENV{PROGRAMFILES(X86)}

Nils Gladitz nilsgladitz at gmail.com
Thu Nov 13 04:11:57 EST 2014


On 11/13/2014 09:51 AM, Mario *LigH* Rohkrämer wrote:
> The line
>
>          "$ENV{PROGRAMFILES(X86)}/Visual Leak Detector"
>
> causes warning CMP0053 because parentheses in identifiers are not
> allowed. Trying to escape them to
>
>          "$ENV{PROGRAMFILES\(X86\)}/Visual Leak Detector"
>
> instead errors out: Syntax error in cmake code; unexpected cal_SYMBOL,
> expecting } (19)
>
> How can this be solved? Is it possible to "quote inside quotes", or are
> there different escapes?
>

I stumbled over the same issue earlier[1].

What should work is something like

	set(MYENV "PROGRAMFILES(X86)")

	...

	"$ENV{${MYENV}}/Visual Leak Detector"

Nils

[1] 
http://public.kitware.com/pipermail/cmake-developers/2014-October/023190.html





More information about the CMake mailing list