| 5222 | } |
| 5223 | |
| 5224 | cmSourcesWithOutput cmLocalGenerator::GetSourcesWithOutput( |
| 5225 | std::string const& name) const |
| 5226 | { |
| 5227 | // Linear search? Also see GetSourceFileWithOutput for detail. |
| 5228 | if (!cmSystemTools::FileIsFullPath(name)) { |
| 5229 | cmSourcesWithOutput sources; |
| 5230 | sources.Target = this->LinearGetTargetWithOutput(name); |
| 5231 | sources.Source = this->LinearGetSourceFileWithOutput( |
| 5232 | name, cmSourceOutputKind::OutputOrByproduct, sources.SourceIsByproduct); |
| 5233 | return sources; |
| 5234 | } |
| 5235 | // Otherwise we use an efficient lookup map. |
| 5236 | auto o = this->OutputToSource.find(name); |
| 5237 | if (o != this->OutputToSource.end()) { |
| 5238 | return o->second.Sources; |
| 5239 | } |
| 5240 | return {}; |
| 5241 | } |
| 5242 | |
| 5243 | cmSourceFile* cmLocalGenerator::GetSourceFileWithOutput( |
| 5244 | std::string const& name, cmSourceOutputKind kind) const |
no test coverage detected