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

Function getCompatibleInterfaceProperties

Source/cmExportFileGenerator.cxx:242–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

240}
241
242void getCompatibleInterfaceProperties(cmGeneratorTarget const* target,
243 std::set<std::string>& ifaceProperties,
244 std::string const& config)
245{
246 if (target->GetType() == cmStateEnums::OBJECT_LIBRARY) {
247 // object libraries have no link information, so nothing to compute
248 return;
249 }
250
251 cmComputeLinkInformation* info = target->GetLinkInformation(config);
252
253 if (!info) {
254 cmLocalGenerator* lg = target->GetLocalGenerator();
255 std::ostringstream e;
256 e << "Exporting the target \"" << target->GetName()
257 << "\" is not "
258 "allowed since its linker language cannot be determined";
259 lg->IssueMessage(MessageType::FATAL_ERROR, e.str());
260 return;
261 }
262
263 cmComputeLinkInformation::ItemVector const& deps = info->GetItems();
264
265 for (auto const& dep : deps) {
266 if (!dep.Target || dep.Target->GetType() == cmStateEnums::OBJECT_LIBRARY) {
267 continue;
268 }
269 getPropertyContents(dep.Target, "COMPATIBLE_INTERFACE_BOOL",
270 ifaceProperties);
271 getPropertyContents(dep.Target, "COMPATIBLE_INTERFACE_STRING",
272 ifaceProperties);
273 getPropertyContents(dep.Target, "COMPATIBLE_INTERFACE_NUMBER_MIN",
274 ifaceProperties);
275 getPropertyContents(dep.Target, "COMPATIBLE_INTERFACE_NUMBER_MAX",
276 ifaceProperties);
277 }
278}
279}
280
281void cmExportFileGenerator::PopulateCompatibleInterfaceProperties(

Calls 8

getPropertyContentsFunction · 0.85
GetLinkInformationMethod · 0.80
strMethod · 0.80
GetItemsMethod · 0.80
GetTypeMethod · 0.45
GetLocalGeneratorMethod · 0.45
GetNameMethod · 0.45
IssueMessageMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…