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
Bill Hoffman
CMake
Commits
28749903
Commit
28749903
authored
Oct 06, 2015
by
Stephen Kelly
Browse files
cmState: Internalize the initialization of a snapshot from its parent.
parent
6c02f62f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Source/cmMakefile.cxx
View file @
28749903
...
@@ -1761,8 +1761,6 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
...
@@ -1761,8 +1761,6 @@ void cmMakefile::AddSubDirectory(const std::string& srcPath,
this
->
ContextStack
.
back
()
->
Name
,
this
->
ContextStack
.
back
()
->
Name
,
this
->
ContextStack
.
back
()
->
Line
);
this
->
ContextStack
.
back
()
->
Line
);
newSnapshot
.
InitializeFromParent
();
newSnapshot
.
GetDirectory
().
SetCurrentSource
(
srcPath
);
newSnapshot
.
GetDirectory
().
SetCurrentSource
(
srcPath
);
newSnapshot
.
GetDirectory
().
SetCurrentBinary
(
binPath
);
newSnapshot
.
GetDirectory
().
SetCurrentBinary
(
binPath
);
...
...
Source/cmState.cxx
View file @
28749903
...
@@ -805,8 +805,10 @@ cmState::CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot,
...
@@ -805,8 +805,10 @@ cmState::CreateBuildsystemDirectorySnapshot(Snapshot originSnapshot,
pos
->
Parent
=
origin
;
pos
->
Parent
=
origin
;
pos
->
Root
=
origin
;
pos
->
Root
=
origin
;
pos
->
Vars
=
this
->
VarTree
.
Extend
(
origin
);
pos
->
Vars
=
this
->
VarTree
.
Extend
(
origin
);
cmState
::
Snapshot
snapshot
=
cmState
::
Snapshot
(
this
,
pos
);
cmState
::
Snapshot
snapshot
=
cmState
::
Snapshot
(
this
,
pos
);
originSnapshot
.
Position
->
BuildSystemDirectory
->
Children
.
push_back
(
snapshot
);
originSnapshot
.
Position
->
BuildSystemDirectory
->
Children
.
push_back
(
snapshot
);
snapshot
.
InitializeFromParent
();
return
snapshot
;
return
snapshot
;
}
}
...
...
Source/cmState.h
View file @
28749903
...
@@ -75,8 +75,6 @@ public:
...
@@ -75,8 +75,6 @@ public:
Snapshot
GetCallStackParent
()
const
;
Snapshot
GetCallStackParent
()
const
;
SnapshotType
GetType
()
const
;
SnapshotType
GetType
()
const
;
void
InitializeFromParent
();
void
SetPolicy
(
cmPolicies
::
PolicyID
id
,
cmPolicies
::
PolicyStatus
status
);
void
SetPolicy
(
cmPolicies
::
PolicyID
id
,
cmPolicies
::
PolicyStatus
status
);
cmPolicies
::
PolicyStatus
GetPolicy
(
cmPolicies
::
PolicyID
id
)
const
;
cmPolicies
::
PolicyStatus
GetPolicy
(
cmPolicies
::
PolicyID
id
)
const
;
bool
HasDefinedPolicyCMP0011
();
bool
HasDefinedPolicyCMP0011
();
...
@@ -105,6 +103,9 @@ public:
...
@@ -105,6 +103,9 @@ public:
friend
class
cmState
;
friend
class
cmState
;
friend
class
Directory
;
friend
class
Directory
;
friend
struct
StrictWeakOrder
;
friend
struct
StrictWeakOrder
;
void
InitializeFromParent
();
cmState
*
State
;
cmState
*
State
;
cmState
::
PositionType
Position
;
cmState
::
PositionType
Position
;
};
};
...
...
Write
Preview
Markdown
is supported
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