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

Function HandleAppendCommand

Source/cmStringCommand.cxx:465–485  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

463}
464
465bool HandleAppendCommand(std::vector<std::string> const& args,
466 cmExecutionStatus& status)
467{
468 if (args.size() < 2) {
469 status.SetError("sub-command APPEND requires at least one argument.");
470 return false;
471 }
472
473 // Skip if nothing to append.
474 if (args.size() < 3) {
475 return true;
476 }
477
478 auto const& variableName = args[1];
479 cm::CMakeString data{ status.GetMakefile().GetDefinition(variableName) };
480
481 data.Append(cmMakeRange(args).advance(2));
482 status.GetMakefile().AddDefinition(variableName, data);
483
484 return true;
485}
486
487bool HandlePrependCommand(std::vector<std::string> const& args,
488 cmExecutionStatus& status)

Callers

nothing calls this directly

Calls 8

cmMakeRangeFunction · 0.85
sizeMethod · 0.45
SetErrorMethod · 0.45
GetDefinitionMethod · 0.45
GetMakefileMethod · 0.45
AppendMethod · 0.45
advanceMethod · 0.45
AddDefinitionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…