/src/CMake/Source/cmStatePrivate.h
Line | Count | Source |
1 | | /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying |
2 | | file LICENSE.rst or https://cmake.org/licensing for details. */ |
3 | | |
4 | | #pragma once |
5 | | |
6 | | #include "cmConfigure.h" // IWYU pragma: keep |
7 | | |
8 | | #include <set> |
9 | | #include <string> |
10 | | #include <unordered_map> |
11 | | #include <vector> |
12 | | |
13 | | #include "cmDefinitions.h" |
14 | | #include "cmLinkedTree.h" |
15 | | #include "cmListFileCache.h" |
16 | | #include "cmPackageState.h" |
17 | | #include "cmPolicies.h" |
18 | | #include "cmPropertyMap.h" |
19 | | #include "cmStateSnapshot.h" |
20 | | #include "cmStateTypes.h" |
21 | | |
22 | | namespace cmStateDetail { |
23 | | struct BuildsystemDirectoryStateType; |
24 | | struct PolicyStackEntry; |
25 | | extern std::string const PropertySentinel; |
26 | | } // namespace cmStateDetail |
27 | | |
28 | | struct cmStateDetail::SnapshotDataType |
29 | | { |
30 | | cmStateDetail::PositionType ScopeParent; |
31 | | cmStateDetail::PositionType DirectoryParent; |
32 | | cmLinkedTree<cmStateDetail::PolicyStackEntry>::iterator Policies; |
33 | | cmLinkedTree<cmStateDetail::PolicyStackEntry>::iterator PolicyRoot; |
34 | | cmLinkedTree<cmStateDetail::PolicyStackEntry>::iterator PolicyScope; |
35 | | cmStateEnums::SnapshotType SnapshotType; |
36 | | cmStateEnums::SnapshotUnwindType UnwindType = cmStateEnums::NO_UNWIND; |
37 | | cmStateEnums::SnapshotUnwindState UnwindState = cmStateEnums::NOT_UNWINDING; |
38 | | bool Keep; |
39 | | cmLinkedTree<std::string>::iterator ExecutionListFile; |
40 | | cmLinkedTree<cmStateDetail::BuildsystemDirectoryStateType>::iterator |
41 | | BuildSystemDirectory; |
42 | | cmLinkedTree<cmDefinitions>::iterator Vars; |
43 | | cmLinkedTree<cmDefinitions>::iterator Root; |
44 | | cmLinkedTree<cmDefinitions>::iterator Parent; |
45 | | std::vector<std::string>::size_type IncludeDirectoryPosition; |
46 | | std::vector<std::string>::size_type CompileDefinitionsPosition; |
47 | | std::vector<std::string>::size_type CompileOptionsPosition; |
48 | | std::vector<std::string>::size_type LinkOptionsPosition; |
49 | | std::vector<std::string>::size_type LinkDirectoriesPosition; |
50 | | }; |
51 | | |
52 | | struct cmStateDetail::PolicyStackEntry : public cmPolicies::PolicyMap |
53 | | { |
54 | | using derived = cmPolicies::PolicyMap; |
55 | | PolicyStackEntry(bool w = false) |
56 | | : Weak(w) |
57 | 0 | { |
58 | 0 | } |
59 | | PolicyStackEntry(derived const& d, bool w) |
60 | 1 | : derived(d) |
61 | 1 | , Weak(w) |
62 | 1 | { |
63 | 1 | } |
64 | | bool Weak; |
65 | | }; |
66 | | |
67 | | struct cmStateDetail::BuildsystemDirectoryStateType |
68 | | { |
69 | | cmStateDetail::PositionType CurrentScope; |
70 | | |
71 | | std::string Location; |
72 | | std::string OutputLocation; |
73 | | |
74 | | std::vector<BT<std::string>> IncludeDirectories; |
75 | | |
76 | | std::vector<BT<std::string>> CompileDefinitions; |
77 | | |
78 | | std::vector<BT<std::string>> CompileOptions; |
79 | | |
80 | | std::vector<BT<std::string>> LinkOptions; |
81 | | |
82 | | std::vector<BT<std::string>> LinkDirectories; |
83 | | |
84 | | std::vector<std::string> NormalTargetNames; |
85 | | std::vector<std::string> ImportedTargetNames; |
86 | | |
87 | | std::set<std::string> Projects; |
88 | | |
89 | | std::string ProjectName; |
90 | | |
91 | | cmPropertyMap Properties; |
92 | | |
93 | | std::unordered_map<std::string, cmPackageState> Packages; |
94 | | |
95 | | std::vector<cmStateSnapshot> Children; |
96 | | }; |