mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-05 05:39:57 -05:00
BUG: Added hack to cmSystemTools::GetPath to make its algorithm correctly parse off the last entry of the system PATH environment variable.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user