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

Method ResolveRelativePath

Source/cmPathResolver.cxx:152–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150
151template <class Policy>
152Control Impl<Policy>::ResolveRelativePath()
153{
154 // This is a relative path. Convert it to absolute and restart.
155 std::string p = this->OS.GetWorkingDirectory();
156 std::replace(p.begin(), p.end(), '\\', '/');
157 if (ClassifyRoot(p) == Root::None) {
158 p.insert(0, 1, '/');
159 }
160 if (p.back() != '/') {
161 p.push_back('/');
162 }
163 P.insert(0, p);
164 return Control::Restart();
165}
166
167#ifdef _WIN32
168std::string ImplBase::GetWorkingDirectoryOnDrive(char letter)

Callers 1

ResolveRootMethod · 0.95

Calls 7

ClassifyRootFunction · 0.85
push_backMethod · 0.80
GetWorkingDirectoryMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected