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

Function AddUtilityCommand

Source/cmLocalGenerator.cxx:5150–5174  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5148}
5149
5150void AddUtilityCommand(cmLocalGenerator& lg, cmCommandOrigin origin,
5151 cmTarget* target, std::unique_ptr<cmCustomCommand> cc)
5152{
5153 // They might be moved away
5154 auto byproducts = cc->GetByproducts();
5155 auto lfbt = cc->GetBacktrace();
5156
5157 // Use an empty comment to avoid generation of default comment.
5158 if (!cc->GetComment()) {
5159 cc->SetComment("");
5160 }
5161
5162 // Create the generated symbolic output name of the utility target.
5163 std::string output =
5164 lg.CreateUtilityOutput(target->GetName(), byproducts, lfbt);
5165 cc->SetOutputs(output);
5166
5167 cmSourceFile* rule = AddCustomCommand(lg, origin, std::move(cc),
5168 /*replace=*/false);
5169 if (rule) {
5170 lg.AddTargetByproducts(target, byproducts, lfbt, origin);
5171 }
5172
5173 target->AddSource(output);
5174}
5175
5176std::vector<std::string> ComputeISPCObjectSuffixes(cmGeneratorTarget* target)
5177{

Callers 3

AddUtilityCommandMethod · 0.85
operator()Method · 0.85
AddUtilityCommandMethod · 0.85

Calls 10

AddCustomCommandFunction · 0.85
moveFunction · 0.85
SetOutputsMethod · 0.80
AddTargetByproductsMethod · 0.80
GetBacktraceMethod · 0.45
GetCommentMethod · 0.45
SetCommentMethod · 0.45
CreateUtilityOutputMethod · 0.45
GetNameMethod · 0.45
AddSourceMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…