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

Method ComputeRelativePathTopSource

Source/cmOutputConverter.cxx:40–54  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40void cmOutputConverter::ComputeRelativePathTopSource()
41{
42 // Walk up the buildsystem directory tree to find the highest source
43 // directory that contains the current source directory.
44 cmStateSnapshot snapshot = this->StateSnapshot;
45 for (cmStateSnapshot parent = snapshot.GetBuildsystemDirectoryParent();
46 parent.IsValid(); parent = parent.GetBuildsystemDirectoryParent()) {
47 if (cmSystemTools::IsSubDirectory(
48 snapshot.GetDirectory().GetCurrentSource(),
49 parent.GetDirectory().GetCurrentSource())) {
50 snapshot = parent;
51 }
52 }
53 this->RelativePathTopSource = snapshot.GetDirectory().GetCurrentSource();
54}
55
56void cmOutputConverter::ComputeRelativePathTopBinary()
57{

Callers 1

cmOutputConverterMethod · 0.95

Calls 3

IsValidMethod · 0.45
GetDirectoryMethod · 0.45

Tested by

no test coverage detected