diff options
author | Brad King <brad.king@kitware.com> | 2016-07-19 12:27:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-07-19 12:27:19 (GMT) |
commit | 788bb146643030ebed27db297af83fe15b1f5447 (patch) | |
tree | 8bd619c7d82cfb523dbbbcaca0e1b86a289e2b01 /Source/kwsys/testSystemTools.cxx | |
parent | 34216023e6160908ae50721504924ef3ab3ed4f9 (diff) | |
parent | eb7b5087f79527242a25c449c6ae837dcb4768ff (diff) | |
download | CMake-788bb146643030ebed27db297af83fe15b1f5447.zip CMake-788bb146643030ebed27db297af83fe15b1f5447.tar.gz CMake-788bb146643030ebed27db297af83fe15b1f5447.tar.bz2 |
Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
KWSys 2016-07-18 (19732229)
Diffstat (limited to 'Source/kwsys/testSystemTools.cxx')
-rw-r--r-- | Source/kwsys/testSystemTools.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/kwsys/testSystemTools.cxx b/Source/kwsys/testSystemTools.cxx index 4d97688..4dab347 100644 --- a/Source/kwsys/testSystemTools.cxx +++ b/Source/kwsys/testSystemTools.cxx @@ -848,9 +848,9 @@ static bool CheckPutEnv(const std::string& env, const char* name, const char* va << "\") failed!" << std::endl; return false; } - const char* v = kwsys::SystemTools::GetEnv(name); - v = v? v : "(null)"; - if(strcmp(v, value) != 0) + std::string v = "(null)"; + kwsys::SystemTools::GetEnv(name, v); + if(v != value) { std::cerr << "GetEnv(\"" << name << "\") returned \"" << v << "\", not \"" << value << "\"!" << std::endl; @@ -867,7 +867,8 @@ static bool CheckUnPutEnv(const char* env, const char* name) << std::endl; return false; } - if(const char* v = kwsys::SystemTools::GetEnv(name)) + std::string v; + if(kwsys::SystemTools::GetEnv(name, v)) { std::cerr << "GetEnv(\"" << name << "\") returned \"" << v << "\", not (null)!" << std::endl; |