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

Method GetObjectLibrariesInSources

Source/cmGeneratorTarget.cxx:4979–5006  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4977}
4978
4979void 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
5008std::string cmGeneratorTarget::CheckCMP0004(std::string const& item) const
5009{

Callers 3

GetDependenciesMethod · 0.80

Calls 7

cmHasLiteralPrefixFunction · 0.85
GetSourceEntriesMethod · 0.80
emplace_backMethod · 0.80
backMethod · 0.45
substrMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected