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

Function HandlePrependCommand

Source/cmStringCommand.cxx:487–506  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485}
486
487bool HandlePrependCommand(std::vector<std::string> const& args,
488 cmExecutionStatus& status)
489{
490 if (args.size() < 2) {
491 status.SetError("sub-command PREPEND requires at least one argument.");
492 return false;
493 }
494
495 // Skip if nothing to prepend.
496 if (args.size() < 3) {
497 return true;
498 }
499
500 std::string const& variable = args[1];
501 cm::CMakeString data{ status.GetMakefile().GetDefinition(variable) };
502
503 data.Prepend(cmMakeRange(args).advance(2));
504 status.GetMakefile().AddDefinition(variable, data);
505 return true;
506}
507
508bool HandleConcatCommand(std::vector<std::string> const& args,
509 cmExecutionStatus& status)

Callers

nothing calls this directly

Calls 8

cmMakeRangeFunction · 0.85
PrependMethod · 0.80
sizeMethod · 0.45
SetErrorMethod · 0.45
GetDefinitionMethod · 0.45
GetMakefileMethod · 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…