mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-29 10:39:28 -05:00
cmState: Rename GetParent method.
Leave the namespace open for other Parent types.
This commit is contained in:
@@ -73,7 +73,7 @@ cmLocalGenerator::~cmLocalGenerator()
|
|||||||
|
|
||||||
bool cmLocalGenerator::IsRootMakefile() const
|
bool cmLocalGenerator::IsRootMakefile() const
|
||||||
{
|
{
|
||||||
return !this->StateSnapshot.GetParent().IsValid();
|
return !this->StateSnapshot.GetBuildsystemDirectoryParent().IsValid();
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|||||||
@@ -4038,7 +4038,8 @@ const char *cmMakefile::GetProperty(const std::string& prop,
|
|||||||
output = "";
|
output = "";
|
||||||
if (prop == "PARENT_DIRECTORY")
|
if (prop == "PARENT_DIRECTORY")
|
||||||
{
|
{
|
||||||
cmState::Snapshot parent = this->StateSnapshot.GetParent();
|
cmState::Snapshot parent =
|
||||||
|
this->StateSnapshot.GetBuildsystemDirectoryParent();
|
||||||
if(parent.IsValid())
|
if(parent.IsValid())
|
||||||
{
|
{
|
||||||
return parent.GetCurrentSourceDirectory();
|
return parent.GetCurrentSourceDirectory();
|
||||||
|
|||||||
+3
-3
@@ -590,7 +590,7 @@ void cmState::Snapshot::ComputeRelativePathTopSource()
|
|||||||
snapshots.push_back(snapshot);
|
snapshots.push_back(snapshot);
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
snapshot = snapshot.GetParent();
|
snapshot = snapshot.GetBuildsystemDirectoryParent();
|
||||||
if (snapshot.IsValid())
|
if (snapshot.IsValid())
|
||||||
{
|
{
|
||||||
snapshots.push_back(snapshot);
|
snapshots.push_back(snapshot);
|
||||||
@@ -622,7 +622,7 @@ void cmState::Snapshot::ComputeRelativePathTopBinary()
|
|||||||
snapshots.push_back(snapshot);
|
snapshots.push_back(snapshot);
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
snapshot = snapshot.GetParent();
|
snapshot = snapshot.GetBuildsystemDirectoryParent();
|
||||||
if (snapshot.IsValid())
|
if (snapshot.IsValid())
|
||||||
{
|
{
|
||||||
snapshots.push_back(snapshot);
|
snapshots.push_back(snapshot);
|
||||||
@@ -775,7 +775,7 @@ bool cmState::Snapshot::IsValid() const
|
|||||||
return this->State ? true : false;
|
return this->State ? true : false;
|
||||||
}
|
}
|
||||||
|
|
||||||
cmState::Snapshot cmState::Snapshot::GetParent() const
|
cmState::Snapshot cmState::Snapshot::GetBuildsystemDirectoryParent() const
|
||||||
{
|
{
|
||||||
Snapshot snapshot;
|
Snapshot snapshot;
|
||||||
if (!this->State || this->Position == 0)
|
if (!this->State || this->Position == 0)
|
||||||
|
|||||||
+1
-1
@@ -45,7 +45,7 @@ public:
|
|||||||
void SetRelativePathTopBinary(const char* dir);
|
void SetRelativePathTopBinary(const char* dir);
|
||||||
|
|
||||||
bool IsValid() const;
|
bool IsValid() const;
|
||||||
Snapshot GetParent() const;
|
Snapshot GetBuildsystemDirectoryParent() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void ComputeRelativePathTopSource();
|
void ComputeRelativePathTopSource();
|
||||||
|
|||||||
Reference in New Issue
Block a user