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

Method ComputeRequiresDeviceLinkingIPOFlag

Source/cmLinkLineDeviceComputer.cxx:72–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70}
71
72bool cmLinkLineDeviceComputer::ComputeRequiresDeviceLinkingIPOFlag(
73 cmComputeLinkInformation& cli)
74{
75 // Determine if this item might requires device linking.
76 // For this we only consider targets
77 using ItemVector = cmComputeLinkInformation::ItemVector;
78 ItemVector const& items = cli.GetItems();
79 std::string config = cli.GetConfig();
80 return std::any_of(
81 items.begin(), items.end(),
82 [config](cmComputeLinkInformation::Item const& item) -> bool {
83 return item.Target &&
84 item.Target->GetType() == cmStateEnums::STATIC_LIBRARY &&
85 // this dependency requires us to device link it
86 !item.Target->GetPropertyAsBool("CUDA_RESOLVE_DEVICE_SYMBOLS") &&
87 item.Target->GetPropertyAsBool("CUDA_SEPARABLE_COMPILATION") &&
88 item.Target->IsIPOEnabled("CUDA", config);
89 });
90}
91
92void cmLinkLineDeviceComputer::ComputeLinkLibraries(
93 cmComputeLinkInformation& cli, std::string const& stdLibString,

Callers 1

GetDeviceLinkFlagsMethod · 0.80

Calls 7

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

Tested by

no test coverage detected