| 5148 | } |
| 5149 | |
| 5150 | void 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 | |
| 5176 | std::vector<std::string> ComputeISPCObjectSuffixes(cmGeneratorTarget* target) |
| 5177 | { |
no test coverage detected
searching dependent graphs…