Browse Source

ENH: Add a method to remove environment variables

pull/1/head
Andy Cedilnik 20 years ago
parent
commit
d5631f370b
  1. 5
      Source/cmSystemTools.cxx
  2. 7
      Source/cmSystemTools.h

5
Source/cmSystemTools.cxx

@ -1280,6 +1280,11 @@ bool cmSystemTools::PutEnv(const char* value)
return ret == 0;
}
bool cmSystemTools::UnsetEnv(const char* value)
{
return unsetenv(value) == 0;
}
std::vector<std::string> cmSystemTools::GetEnvironmentVariables()
{
std::vector<std::string> env;

7
Source/cmSystemTools.h

@ -291,9 +291,14 @@ public:
*/
static std::string RelativePath(const char* local, const char* remote);
/** put a string into the environment
/** Put a string into the environment
of the form var=value */
static bool PutEnv(const char* value);
/** Remove an environment variable */
static bool UnsetEnv(const char* value);
/** Get the list of all environment variables */
static std::vector<std::string> GetEnvironmentVariables();
/** Setup the environment to enable VS 8 IDE output. */

Loading…
Cancel
Save