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

Method ComputeRequiresDeviceLinking

Source/cmLinkLineDeviceComputer.cxx:54–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54bool cmLinkLineDeviceComputer::ComputeRequiresDeviceLinking(
55 cmComputeLinkInformation& cli)
56{
57 // Determine if this item might requires device linking.
58 // For this we only consider targets
59 using ItemVector = cmComputeLinkInformation::ItemVector;
60 ItemVector const& items = cli.GetItems();
61 return std::any_of(
62 items.begin(), items.end(),
63 [](cmComputeLinkInformation::Item const& item) -> bool {
64 return item.Target &&
65 item.Target->GetType() == cmStateEnums::STATIC_LIBRARY &&
66 // this dependency requires us to device link it
67 !item.Target->GetPropertyAsBool("CUDA_RESOLVE_DEVICE_SYMBOLS") &&
68 item.Target->GetPropertyAsBool("CUDA_SEPARABLE_COMPILATION");
69 });
70}
71
72bool cmLinkLineDeviceComputer::ComputeRequiresDeviceLinkingIPOFlag(
73 cmComputeLinkInformation& cli)

Callers 1

requireDeviceLinkingFunction · 0.80

Calls 5

GetItemsMethod · 0.80
beginMethod · 0.45
endMethod · 0.45
GetTypeMethod · 0.45
GetPropertyAsBoolMethod · 0.45

Tested by

no test coverage detected