| 70 | } |
| 71 | |
| 72 | bool 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 | |
| 92 | void cmLinkLineDeviceComputer::ComputeLinkLibraries( |
| 93 | cmComputeLinkInformation& cli, std::string const& stdLibString, |
no test coverage detected