Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
CMake
CMake
Commits
2dc40996
Commit
2dc40996
authored
Oct 18, 2016
by
Stephen Kelly
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmState: Move PolicyStackEntry to separate namespace
parent
cb40af5d
Pipeline
#31509
passed with stage
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
Source/cmState.cxx
Source/cmState.cxx
+10
-9
Source/cmState.h
Source/cmState.h
+2
-2
No files found.
Source/cmState.cxx
View file @
2dc40996
...
...
@@ -29,9 +29,9 @@ struct cmStateDetail::SnapshotDataType
{
cmState
::
PositionType
ScopeParent
;
cmState
::
PositionType
DirectoryParent
;
cmLinkedTree
<
cmState
::
PolicyStackEntry
>::
iterator
Policies
;
cmLinkedTree
<
cmState
::
PolicyStackEntry
>::
iterator
PolicyRoot
;
cmLinkedTree
<
cmState
::
PolicyStackEntry
>::
iterator
PolicyScope
;
cmLinkedTree
<
cmState
Detail
::
PolicyStackEntry
>::
iterator
Policies
;
cmLinkedTree
<
cmState
Detail
::
PolicyStackEntry
>::
iterator
PolicyRoot
;
cmLinkedTree
<
cmState
Detail
::
PolicyStackEntry
>::
iterator
PolicyScope
;
cmState
::
SnapshotType
SnapshotType
;
bool
Keep
;
cmLinkedTree
<
std
::
string
>::
iterator
ExecutionListFile
;
...
...
@@ -45,7 +45,7 @@ struct cmStateDetail::SnapshotDataType
std
::
vector
<
std
::
string
>::
size_type
CompileOptionsPosition
;
};
struct
cmState
::
PolicyStackEntry
:
public
cmPolicies
::
PolicyMap
struct
cmState
Detail
::
PolicyStackEntry
:
public
cmPolicies
::
PolicyMap
{
typedef
cmPolicies
::
PolicyMap
derived
;
PolicyStackEntry
(
bool
w
=
false
)
...
...
@@ -1078,8 +1078,8 @@ cmState::Snapshot cmState::Snapshot::GetCallStackBottom() const
void
cmState
::
Snapshot
::
PushPolicy
(
cmPolicies
::
PolicyMap
entry
,
bool
weak
)
{
PositionType
pos
=
this
->
Position
;
pos
->
Policies
=
this
->
State
->
PolicyStack
.
Push
(
pos
->
Policies
,
PolicyStackEntry
(
entry
,
weak
));
pos
->
Policies
=
this
->
State
->
PolicyStack
.
Push
(
pos
->
Policies
,
cmStateDetail
::
PolicyStackEntry
(
entry
,
weak
));
}
bool
cmState
::
Snapshot
::
PopPolicy
()
...
...
@@ -1102,7 +1102,8 @@ void cmState::Snapshot::SetPolicy(cmPolicies::PolicyID id,
{
// Update the policy stack from the top to the top-most strong entry.
bool
previous_was_weak
=
true
;
for
(
cmLinkedTree
<
PolicyStackEntry
>::
iterator
psi
=
this
->
Position
->
Policies
;
for
(
cmLinkedTree
<
cmStateDetail
::
PolicyStackEntry
>::
iterator
psi
=
this
->
Position
->
Policies
;
previous_was_weak
&&
psi
!=
this
->
Position
->
PolicyRoot
;
++
psi
)
{
psi
->
Set
(
id
,
status
);
previous_was_weak
=
psi
->
Weak
;
...
...
@@ -1124,9 +1125,9 @@ cmPolicies::PolicyStatus cmState::Snapshot::GetPolicy(
while
(
true
)
{
assert
(
dir
.
IsValid
());
cmLinkedTree
<
PolicyStackEntry
>::
iterator
leaf
=
cmLinkedTree
<
cmStateDetail
::
PolicyStackEntry
>::
iterator
leaf
=
dir
->
DirectoryEnd
->
Policies
;
cmLinkedTree
<
PolicyStackEntry
>::
iterator
root
=
cmLinkedTree
<
cmStateDetail
::
PolicyStackEntry
>::
iterator
root
=
dir
->
DirectoryEnd
->
PolicyRoot
;
for
(;
leaf
!=
root
;
++
leaf
)
{
if
(
leaf
->
IsDefined
(
id
))
{
...
...
Source/cmState.h
View file @
2dc40996
...
...
@@ -26,11 +26,11 @@ class cmPropertyDefinition;
namespace
cmStateDetail
{
struct
BuildsystemDirectoryStateType
;
struct
SnapshotDataType
;
struct
PolicyStackEntry
;
}
class
cmState
{
struct
PolicyStackEntry
;
typedef
cmLinkedTree
<
cmStateDetail
::
SnapshotDataType
>::
iterator
PositionType
;
friend
class
Snapshot
;
friend
struct
cmStateDetail
::
BuildsystemDirectoryStateType
;
...
...
@@ -341,7 +341,7 @@ private:
cmLinkedTree
<
std
::
string
>
ExecutionListFiles
;
cmLinkedTree
<
PolicyStackEntry
>
PolicyStack
;
cmLinkedTree
<
cmStateDetail
::
PolicyStackEntry
>
PolicyStack
;
cmLinkedTree
<
cmStateDetail
::
SnapshotDataType
>
SnapshotData
;
cmLinkedTree
<
cmDefinitions
>
VarTree
;
...
...
Brad King
@brad.king
Mentioned in commit
92c3cab2
·
Oct 20, 2016
Mentioned in commit
92c3cab2
Mentioned in commit 92c3cab223845ca83533bba7b6d73f6180223935
Toggle commit list
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