summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-03-17 17:24:37 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-03-17 17:24:37 (GMT)
commit0addc75520d46f628fc84f76ba52c84dfaac5795 (patch)
tree27eec037e8edbe11efd3530c14a58a4b8f3228bd /Source
parente9fcafafe52d01cc3b89190b3787bebd807198f0 (diff)
downloadCMake-0addc75520d46f628fc84f76ba52c84dfaac5795.zip
CMake-0addc75520d46f628fc84f76ba52c84dfaac5795.tar.gz
CMake-0addc75520d46f628fc84f76ba52c84dfaac5795.tar.bz2
COMP: Handle windows with hack for now
Diffstat (limited to 'Source')
-rw-r--r--Source/cmSystemTools.cxx11
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()