| 1318 | } |
| 1319 | |
| 1320 | void cmFastbuildNormalTargetGenerator::GenerateCudaDeviceLink( |
| 1321 | FastbuildTarget& target) const |
| 1322 | { |
| 1323 | auto const arches = this->GetArches(); |
| 1324 | if (!requireDeviceLinking(*this->GeneratorTarget, *this->GetLocalGenerator(), |
| 1325 | Config)) { |
| 1326 | return; |
| 1327 | } |
| 1328 | LogMessage("GenerateCudaDeviceLink(...)"); |
| 1329 | for (auto const& arch : arches) { |
| 1330 | std::string linker; |
| 1331 | std::string args; |
| 1332 | GetCudaDeviceLinkLinkerAndArgs(linker, args); |
| 1333 | |
| 1334 | FastbuildLinkerNode deviceLinkNode; |
| 1335 | deviceLinkNode.Name = cmStrCat(target.Name, "_cuda_device_link"); |
| 1336 | deviceLinkNode.Type = FastbuildLinkerNode::SHARED_LIBRARY; |
| 1337 | deviceLinkNode.Linker = std::move(linker); |
| 1338 | deviceLinkNode.LinkerOptions = std::move(args); |
| 1339 | // Output |
| 1340 | deviceLinkNode.LinkerOutput = this->ConvertToFastbuildPath(cmStrCat( |
| 1341 | FASTBUILD_DOLLAR_TAG "TargetOutDi" |
| 1342 | "r" FASTBUILD_DOLLAR_TAG "/cmake_device_link", |
| 1343 | (args.empty() ? "" : "_" + arch), |
| 1344 | this->Makefile->GetSafeDefinition("CMAKE_CUDA_OUTPUT_" |
| 1345 | "EXTENSION"))); |
| 1346 | |
| 1347 | // Input |
| 1348 | for (auto const& objList : target.ObjectListNodes) { |
| 1349 | deviceLinkNode.LibrarianAdditionalInputs.push_back(objList.Name); |
| 1350 | } |
| 1351 | target.CudaDeviceLinkNode.emplace_back(std::move(deviceLinkNode)); |
| 1352 | } |
| 1353 | LogMessage("GenerateCudaDeviceLink end"); |
| 1354 | } |
| 1355 | |
| 1356 | void cmFastbuildNormalTargetGenerator::GenerateObjects(FastbuildTarget& target) |
| 1357 | { |
nothing calls this directly
no test coverage detected