| 1420 | }; |
| 1421 | |
| 1422 | cmSourceFile* cmTarget::AddSource(std::string const& src, bool before) |
| 1423 | { |
| 1424 | cmSourceFileLocation sfl(this->impl->Makefile, src, |
| 1425 | cmSourceFileLocationKind::Known); |
| 1426 | auto const& sources = this->impl->Sources.Entries; |
| 1427 | if (std::find_if(sources.begin(), sources.end(), |
| 1428 | TargetPropertyEntryFinder(sfl)) == sources.end()) { |
| 1429 | this->impl->Sources.WriteDirect( |
| 1430 | this->impl.get(), {}, cmValue(src), |
| 1431 | before ? UsageRequirementProperty::Action::Prepend |
| 1432 | : UsageRequirementProperty::Action::Append); |
| 1433 | } |
| 1434 | if (cmGeneratorExpression::Find(src) != std::string::npos) { |
| 1435 | return nullptr; |
| 1436 | } |
| 1437 | return this->impl->Makefile->GetOrCreateSource( |
| 1438 | src, false, cmSourceFileLocationKind::Known); |
| 1439 | } |
| 1440 | |
| 1441 | void cmTarget::ClearDependencyInformation(cmMakefile& mf) const |
| 1442 | { |
no test coverage detected