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

Function HandleRemoveDuplicatesCommand

Source/cmListCommand.cxx:420–440  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

418}
419
420bool HandleRemoveDuplicatesCommand(std::vector<std::string> const& args,
421 cmExecutionStatus& status)
422{
423 assert(args.size() >= 2);
424 if (args.size() > 2) {
425 status.SetError("sub-command REMOVE_DUPLICATES only takes one argument.");
426 return false;
427 }
428
429 std::string const& listName = args[1];
430 // expand the variable
431 auto list = GetList(listName, status.GetMakefile());
432
433 if (!list) {
434 return true;
435 }
436
437 status.GetMakefile().AddDefinition(listName,
438 list->remove_duplicates().to_string());
439 return true;
440}
441
442bool HandleTransformCommand(std::vector<std::string> const& args,
443 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…