| 4977 | } |
| 4978 | |
| 4979 | void cmGeneratorTarget::GetObjectLibrariesInSources( |
| 4980 | std::vector<BT<cmGeneratorTarget*>>& objlibs) const |
| 4981 | { |
| 4982 | // FIXME: This searches SOURCES for TARGET_OBJECTS for backwards |
| 4983 | // compatibility with the OLD behavior of CMP0026 since this |
| 4984 | // could be called at configure time. CMP0026 has been removed, |
| 4985 | // so this should now be called only at generate time. |
| 4986 | // Therefore we should be able to improve the implementation |
| 4987 | // with generate-time information. |
| 4988 | cmBTStringRange rng = this->Target->GetSourceEntries(); |
| 4989 | for (auto const& entry : rng) { |
| 4990 | cmList files{ entry.Value }; |
| 4991 | for (auto const& li : files) { |
| 4992 | if (cmHasLiteralPrefix(li, "$<TARGET_OBJECTS:") && li.back() == '>') { |
| 4993 | std::string objLibName = li.substr(17, li.size() - 18); |
| 4994 | |
| 4995 | if (cmGeneratorExpression::Find(objLibName) != std::string::npos) { |
| 4996 | continue; |
| 4997 | } |
| 4998 | cmGeneratorTarget* objLib = |
| 4999 | this->LocalGenerator->FindGeneratorTargetToUse(objLibName); |
| 5000 | if (objLib) { |
| 5001 | objlibs.emplace_back(objLib, entry.Backtrace); |
| 5002 | } |
| 5003 | } |
| 5004 | } |
| 5005 | } |
| 5006 | } |
| 5007 | |
| 5008 | std::string cmGeneratorTarget::CheckCMP0004(std::string const& item) const |
| 5009 | { |
no test coverage detected