[CMake] Possible bug in environment variable expansion?

Chris Volpe ARA/SED cvolpe at ara.com
Fri Aug 15 13:14:04 EDT 2014


David-

> There are no "types" for environment variables.

Not in other operating systems, perhaps, but I think it's perfectly reasonable to adopt the colloquial operating definition that, in Windows, the "type of an environment variable" is the type of the Registry value used to hold that environment variable.

> See this article: http://support.microsoft.com/kb/256986 and note the descriptions of REG_SZ and REG_EXPAND_SZ.

I don't think I've said anything that indicates that I don't already understand what's contained there.

> The fact that you can do it in RapidEE does not mean it's a built-in feature of Windows environment variables.

Given that the environment variables are stored in the registry, I'd say that *does* mean it's a built-in feature of Windows environment variables, insofar as it's a built-in feature of the implementation of environment variables on Windows.

> but you can't count on that feature for use from *any* program that deals with environment variables. You can only count on it when you are setting an environment variable via RapidEE's user interface.

Apparently, I can count on the setting of that type in RapidEE as having a profound impact on what value is reported by the "set" command in cmd.exe. I'm having a hard time figuring out what your point is. I'm merely trying to point out Windows behavior which, to my knowledge, is not widely known, and may give some people trouble when dealing with applications (like CMake) that make use of environment variables that contain references to other environment variables.

Are we arguing over semantics here?

-Chris

-----Original Message-----
From: David Cole [mailto:dlrdave at aol.com] 
Sent: Friday, August 15, 2014 11:57 AM
To: Chris Volpe ARA/SED; andrew.amaclean at gmail.com; cmake at cmake.org; Lucas.Pettey at engilitycorp.com
Subject: Re: [CMake] Possible bug in environment variable expansion?

There are no "types" for environment variables.

There are types for values stored in the registry.

See this article: http://support.microsoft.com/kb/256986 and note the descriptions of REG_SZ and REG_EXPAND_SZ.

The fact that you can do it in RapidEE does not mean it's a built-in feature of Windows environment variables. It means they have a nice feature built on top of Windows environment variables, ... but you can't count on that feature for use from *any* program that deals with environment variables. You can only count on it when you are setting an environment variable via RapidEE's user interface.


David C.



More information about the CMake mailing list