Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
cf1233a0
Commit
cf1233a0
authored
May 23, 2015
by
Stephen Kelly
Browse files
cmState: Rename GetParent method.
Leave the namespace open for other Parent types.
parent
942df88b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Source/cmLocalGenerator.cxx
View file @
cf1233a0
...
...
@@ -73,7 +73,7 @@ cmLocalGenerator::~cmLocalGenerator()
bool
cmLocalGenerator
::
IsRootMakefile
()
const
{
return
!
this
->
StateSnapshot
.
GetParent
().
IsValid
();
return
!
this
->
StateSnapshot
.
Get
BuildsystemDirectory
Parent
().
IsValid
();
}
//----------------------------------------------------------------------------
...
...
Source/cmMakefile.cxx
View file @
cf1233a0
...
...
@@ -4038,7 +4038,8 @@ const char *cmMakefile::GetProperty(const std::string& prop,
output
=
""
;
if
(
prop
==
"PARENT_DIRECTORY"
)
{
cmState
::
Snapshot
parent
=
this
->
StateSnapshot
.
GetParent
();
cmState
::
Snapshot
parent
=
this
->
StateSnapshot
.
GetBuildsystemDirectoryParent
();
if
(
parent
.
IsValid
())
{
return
parent
.
GetCurrentSourceDirectory
();
...
...
Source/cmState.cxx
View file @
cf1233a0
...
...
@@ -590,7 +590,7 @@ void cmState::Snapshot::ComputeRelativePathTopSource()
snapshots
.
push_back
(
snapshot
);
while
(
true
)
{
snapshot
=
snapshot
.
GetParent
();
snapshot
=
snapshot
.
Get
BuildsystemDirectory
Parent
();
if
(
snapshot
.
IsValid
())
{
snapshots
.
push_back
(
snapshot
);
...
...
@@ -622,7 +622,7 @@ void cmState::Snapshot::ComputeRelativePathTopBinary()
snapshots
.
push_back
(
snapshot
);
while
(
true
)
{
snapshot
=
snapshot
.
GetParent
();
snapshot
=
snapshot
.
Get
BuildsystemDirectory
Parent
();
if
(
snapshot
.
IsValid
())
{
snapshots
.
push_back
(
snapshot
);
...
...
@@ -775,7 +775,7 @@ bool cmState::Snapshot::IsValid() const
return
this
->
State
?
true
:
false
;
}
cmState
::
Snapshot
cmState
::
Snapshot
::
GetParent
()
const
cmState
::
Snapshot
cmState
::
Snapshot
::
Get
BuildsystemDirectory
Parent
()
const
{
Snapshot
snapshot
;
if
(
!
this
->
State
||
this
->
Position
==
0
)
...
...
Source/cmState.h
View file @
cf1233a0
...
...
@@ -45,7 +45,7 @@ public:
void
SetRelativePathTopBinary
(
const
char
*
dir
);
bool
IsValid
()
const
;
Snapshot
GetParent
()
const
;
Snapshot
Get
BuildsystemDirectory
Parent
()
const
;
private:
void
ComputeRelativePathTopSource
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment