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

Function HandleJoinCommand

Source/cmListCommand.cxx:352–375  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352bool HandleJoinCommand(std::vector<std::string> const& args,
353 cmExecutionStatus& status)
354{
355 if (args.size() != 4) {
356 status.SetError(cmStrCat("sub-command JOIN requires three arguments (",
357 args.size() - 1, " found)."));
358 return false;
359 }
360
361 std::string const& listName = args[1];
362 std::string const& glue = args[2];
363 std::string const& variableName = args[3];
364
365 // expand the variable
366 auto list = GetList(listName, status.GetMakefile());
367
368 if (!list) {
369 status.GetMakefile().AddDefinition(variableName, "");
370 return true;
371 }
372
373 status.GetMakefile().AddDefinition(variableName, list->join(glue));
374 return true;
375}
376
377bool HandleRemoveItemCommand(std::vector<std::string> const& args,
378 cmExecutionStatus& status)

Callers

nothing calls this directly

Calls 7

joinMethod · 0.80
cmStrCatFunction · 0.70
GetListFunction · 0.70
sizeMethod · 0.45
SetErrorMethod · 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…