| 4336 | |
| 4337 | namespace { |
| 4338 | std::string relativeIfUnder(std::string const& top, std::string const& cur, |
| 4339 | std::string const& path) |
| 4340 | { |
| 4341 | // Use a path relative to 'cur' if it can be expressed without |
| 4342 | // a `../` sequence that leaves 'top'. |
| 4343 | if (cmSystemTools::IsSubDirectory(path, cur) || |
| 4344 | (cmSystemTools::IsSubDirectory(cur, top) && |
| 4345 | cmSystemTools::IsSubDirectory(path, top))) { |
| 4346 | return cmSystemTools::ForceToRelativePath(cur, path); |
| 4347 | } |
| 4348 | return path; |
| 4349 | } |
| 4350 | } |
| 4351 | |
| 4352 | std::string cmLocalGenerator::GetRelativeSourceFileName( |
no outgoing calls
no test coverage detected
searching dependent graphs…