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

Function HandleReverseCommand

Source/cmListCommand.cxx:399–418  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

397}
398
399bool HandleReverseCommand(std::vector<std::string> const& args,
400 cmExecutionStatus& status)
401{
402 assert(args.size() >= 2);
403 if (args.size() > 2) {
404 status.SetError("sub-command REVERSE only takes one argument.");
405 return false;
406 }
407
408 std::string const& listName = args[1];
409 // expand the variable
410 auto list = GetList(listName, status.GetMakefile());
411
412 if (!list) {
413 return true;
414 }
415
416 status.GetMakefile().AddDefinition(listName, list->reverse().to_string());
417 return true;
418}
419
420bool HandleRemoveDuplicatesCommand(std::vector<std::string> const& args,
421 cmExecutionStatus& status)

Callers

nothing calls this directly

Calls 6

to_stringMethod · 0.80
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…