MCPcopy Index your code
hub / github.com/Kitware/CMake / HandleLengthCommand

Function HandleLengthCommand

Source/cmListCommand.cxx:95–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

93}
94
95bool HandleLengthCommand(std::vector<std::string> const& args,
96 cmExecutionStatus& status)
97{
98 if (args.size() != 3) {
99 status.SetError("sub-command LENGTH requires two arguments.");
100 return false;
101 }
102
103 std::string const& listName = args[1];
104 std::string const& variableName = args.back();
105
106 auto list = GetList(listName, status.GetMakefile());
107 status.GetMakefile().AddDefinition(variableName,
108 std::to_string(list ? list->size() : 0));
109
110 return true;
111}
112
113bool HandleGetCommand(std::vector<std::string> const& args,
114 cmExecutionStatus& status)

Callers

nothing calls this directly

Calls 7

to_stringFunction · 0.85
GetListFunction · 0.70
sizeMethod · 0.45
SetErrorMethod · 0.45
backMethod · 0.45
GetMakefileMethod · 0.45
AddDefinitionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…