MCPcopy Create free account
hub / github.com/Kitware/CMake / ClosureKeys

Method ClosureKeys

Source/cmDefinitions.cxx:81–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81std::vector<std::string> cmDefinitions::ClosureKeys(StackIter begin,
82 StackIter end)
83{
84 std::vector<std::string> defined;
85 std::unordered_set<cm::string_view> bound;
86
87 for (StackIter it = begin; it != end; ++it) {
88 defined.reserve(defined.size() + it->Map.size());
89 for (auto const& mi : it->Map) {
90 // Use this key if it is not already set or unset.
91 if (bound.emplace(mi.first.view()).second && mi.second.Value) {
92 defined.push_back(*mi.first.str_if_stable());
93 }
94 }
95 }
96
97 return defined;
98}
99
100void cmDefinitions::Set(std::string const& key, cm::string_view value)
101{

Callers 3

GetDefinitionsMethod · 0.45
CreateMethod · 0.45
GetPropertyMethod · 0.45

Calls 6

reserveMethod · 0.80
emplaceMethod · 0.80
viewMethod · 0.80
push_backMethod · 0.80
str_if_stableMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected