diff options
author | Brad King <brad.king@kitware.com> | 2001-05-25 18:31:35 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2001-05-25 18:31:35 (GMT) |
commit | ad2437f08c24b4ffce7814dd5bfd4e5d043e09ba (patch) | |
tree | b94be416db9969e72f79179df2dd758395e24c97 /Source | |
parent | c60696ccaf8a0d35a424389106d7d11c37248382 (diff) | |
download | CMake-ad2437f08c24b4ffce7814dd5bfd4e5d043e09ba.zip CMake-ad2437f08c24b4ffce7814dd5bfd4e5d043e09ba.tar.gz CMake-ad2437f08c24b4ffce7814dd5bfd4e5d043e09ba.tar.bz2 |
BUG: Added hack to cmSystemTools::GetPath to make its algorithm correctly parse off the last entry of the system PATH environment variable.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmSystemTools.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 4af4242..f2ef341 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -90,6 +90,11 @@ void cmSystemTools::GetPath(std::vector<std::string>& path) const char* pathSep = ":"; #endif std::string pathEnv = getenv("PATH"); + // A hack to make the below algorithm work. + if(pathEnv[pathEnv.length()-1] != ':') + { + pathEnv += ":"; + } std::string::size_type start =0; bool done = false; while(!done) |