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

Method ComputeRelativePathTopBinary

Source/cmOutputConverter.cxx:56–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56void cmOutputConverter::ComputeRelativePathTopBinary()
57{
58 // Walk up the buildsystem directory tree to find the highest binary
59 // directory that contains the current binary directory.
60 cmStateSnapshot snapshot = this->StateSnapshot;
61 for (cmStateSnapshot parent = snapshot.GetBuildsystemDirectoryParent();
62 parent.IsValid(); parent = parent.GetBuildsystemDirectoryParent()) {
63 if (cmSystemTools::IsSubDirectory(
64 snapshot.GetDirectory().GetCurrentBinary(),
65 parent.GetDirectory().GetCurrentBinary())) {
66 snapshot = parent;
67 }
68 }
69
70 this->RelativePathTopBinary = snapshot.GetDirectory().GetCurrentBinary();
71}
72
73void cmOutputConverter::ComputeRelativePathTopRelation()
74{

Callers 1

cmOutputConverterMethod · 0.95

Calls 3

IsValidMethod · 0.45
GetDirectoryMethod · 0.45

Tested by

no test coverage detected