diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2009-06-05 16:01:30 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2009-06-05 16:01:30 (GMT) |
commit | fdff8eb300872af8546b738c0ffc4ac704d5feac (patch) | |
tree | ed5c6e5e82c0ecc75d19ef2b2ba86657537eaa51 /Source/cmSystemTools.cxx | |
parent | d5f80203918c7428c90735c43bce7ed2865bda83 (diff) | |
download | CMake-fdff8eb300872af8546b738c0ffc4ac704d5feac.zip CMake-fdff8eb300872af8546b738c0ffc4ac704d5feac.tar.gz CMake-fdff8eb300872af8546b738c0ffc4ac704d5feac.tar.bz2 |
ENH: move PutEnv to SystemTools
Diffstat (limited to 'Source/cmSystemTools.cxx')
-rw-r--r-- | Source/cmSystemTools.cxx | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 91c6df7..d907288 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1606,32 +1606,6 @@ std::string cmSystemTools::RelativePath(const char* local, const char* remote) return cmsys::SystemTools::RelativePath(local, remote); } -class cmDeletingCharVector : public std::vector<char*> -{ -public: - ~cmDeletingCharVector() - { - for(std::vector<char*>::iterator i = this->begin(); - i != this->end(); ++i) - { - delete []*i; - } - } -}; - - -bool cmSystemTools::PutEnv(const char* value) -{ - static cmDeletingCharVector localEnvironment; - char* envVar = new char[strlen(value)+1]; - strcpy(envVar, value); - int ret = putenv(envVar); - // save the pointer in the static vector so that it can - // be deleted on exit - localEnvironment.push_back(envVar); - return ret == 0; -} - #ifdef CMAKE_BUILD_WITH_CMAKE //---------------------------------------------------------------------- bool cmSystemTools::UnsetEnv(const char* value) |