diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-03-17 17:24:37 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2006-03-17 17:24:37 (GMT) |
commit | 0addc75520d46f628fc84f76ba52c84dfaac5795 (patch) | |
tree | 27eec037e8edbe11efd3530c14a58a4b8f3228bd | |
parent | e9fcafafe52d01cc3b89190b3787bebd807198f0 (diff) | |
download | CMake-0addc75520d46f628fc84f76ba52c84dfaac5795.zip CMake-0addc75520d46f628fc84f76ba52c84dfaac5795.tar.gz CMake-0addc75520d46f628fc84f76ba52c84dfaac5795.tar.bz2 |
COMP: Handle windows with hack for now
-rw-r--r-- | Source/cmSystemTools.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 3b63e87..28662a9 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1282,7 +1282,18 @@ bool cmSystemTools::PutEnv(const char* value) bool cmSystemTools::UnsetEnv(const char* value) { +#ifdef _WIN32 + std::string var = value; + std::string::size_type pos = var.find("="); + if ( pos == var.npos ) + { + continue; + } + var = var.substr(0, pos+1); + return cmSystemTools::PutEnv(var.c_str()); +#else return unsetenv(value) == 0; +#endif } std::vector<std::string> cmSystemTools::GetEnvironmentVariables() |