summaryrefslogtreecommitdiffstats
path: root/SystemTools.cxx
diff options
context:
space:
mode:
authorKWSys Upstream <kwrobot@kitware.com>2016-08-01 19:20:05 (GMT)
committerBrad King <brad.king@kitware.com>2016-08-02 13:21:31 (GMT)
commit6bc3073e23af70bde3e8a7659aa51a784deeec9c (patch)
treefb5ecfbd29e9e5e124cff043d47009ec5ec55007 /SystemTools.cxx
parent9ef2b2b164a92081bf3466af9ac0d0c28acae79d (diff)
downloadCMake-6bc3073e23af70bde3e8a7659aa51a784deeec9c.zip
CMake-6bc3073e23af70bde3e8a7659aa51a784deeec9c.tar.gz
CMake-6bc3073e23af70bde3e8a7659aa51a784deeec9c.tar.bz2
KWSys 2016-08-01 (560bcdbb)
Code extracted from: http://public.kitware.com/KWSys.git at commit 560bcdbb972cbf4c7ea77010363c652b697b9933 (master). Upstream Shortlog ----------------- Brad King (1): 560bcdbb SystemTools: Factor out common `const char* GetEnv()` private implementation James Johnston (1): 1c147abb Directory: Use Windows API wherever possible and port to Embarcadero
Diffstat (limited to 'SystemTools.cxx')
-rw-r--r--SystemTools.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/SystemTools.cxx b/SystemTools.cxx
index 0526372..9b56db0 100644
--- a/SystemTools.cxx
+++ b/SystemTools.cxx
@@ -523,7 +523,7 @@ void SystemTools::GetPath(std::vector<std::string>& path, const char* env)
}
}
-const char* SystemTools::GetEnv(const char* key)
+const char* SystemTools::GetEnvImpl(const char* key)
{
const char *v = 0;
#if defined(_WIN32)
@@ -540,9 +540,14 @@ const char* SystemTools::GetEnv(const char* key)
return v;
}
+const char* SystemTools::GetEnv(const char* key)
+{
+ return SystemTools::GetEnvImpl(key);
+}
+
const char* SystemTools::GetEnv(const std::string& key)
{
- return SystemTools::GetEnv(key.c_str());
+ return SystemTools::GetEnvImpl(key.c_str());
}
bool SystemTools::GetEnv(const char* key, std::string& result)