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

Function GetList

Source/cmListCommand.cxx:72–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72cm::optional<cmList> GetList(std::string const& var,
73 cmMakefile const& makefile)
74{
75 cm::optional<cmList> list;
76
77 std::string listString;
78 if (!GetListString(listString, var, makefile)) {
79 return list;
80 }
81 // if the size of the list
82 if (listString.empty()) {
83 list.emplace();
84 return list;
85 }
86 // expand the variable into a list
87 list.emplace(listString, cmList::EmptyElements::Yes);
88 // if no empty elements then just return
89 if (!cm::contains(*list, std::string())) {
90 return list;
91 }
92 return list;
93}
94
95bool HandleLengthCommand(std::vector<std::string> const& args,
96 cmExecutionStatus& status)

Callers 15

HandleLengthCommandFunction · 0.70
HandleGetCommandFunction · 0.70
HandlePopBackCommandFunction · 0.70
HandlePopFrontCommandFunction · 0.70
HandleFindCommandFunction · 0.70
HandleInsertCommandFunction · 0.70
HandleJoinCommandFunction · 0.70
HandleRemoveItemCommandFunction · 0.70
HandleReverseCommandFunction · 0.70
HandleTransformCommandFunction · 0.70
HandleSortCommandFunction · 0.70

Calls 3

GetListStringFunction · 0.85
emplaceMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…