MCPcopy Create free account
hub / github.com/Kitware/CMake / InitLogicalWorkingDirectory

Function InitLogicalWorkingDirectory

Source/cmSystemTools.cxx:2987–2999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2985
2986namespace {
2987std::string InitLogicalWorkingDirectory()
2988{
2989 std::string cwd = cmsys::SystemTools::GetCurrentWorkingDirectory();
2990 std::string pwd;
2991 if (cmSystemTools::GetEnv("PWD", pwd) &&
2992 cmSystemTools::FileIsFullPath(pwd)) {
2993 std::string const pwd_real = cmSystemTools::GetRealPath(pwd);
2994 if (pwd_real == cwd) {
2995 cwd = cmSystemTools::ToNormalizedPathOnDisk(std::move(pwd));
2996 }
2997 }
2998 return cwd;
2999}
3000
3001std::string cmSystemToolsLogicalWorkingDirectory =
3002 InitLogicalWorkingDirectory();

Callers 1

cmSystemTools.cxxFile · 0.85

Calls 2

GetRealPathFunction · 0.85
moveFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…