mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-21 14:40:26 -06:00
CUDA: static lib device linking computes required static libs
Previously the CMake didn't compute the required set of libraries needed to properly device link a static library when CUDA_RESOLVE_DEVICE_SYMBOLS was enabled.
This commit is contained in:
@@ -300,19 +300,16 @@ void cmMakefileLibraryTargetGenerator::WriteDeviceLibraryRules(
|
||||
|
||||
// Collect up flags to link in needed libraries.
|
||||
std::string linkLibs;
|
||||
if (this->GeneratorTarget->GetType() != cmStateEnums::STATIC_LIBRARY) {
|
||||
std::unique_ptr<cmLinkLineComputer> linkLineComputer(
|
||||
new cmLinkLineDeviceComputer(
|
||||
this->LocalGenerator,
|
||||
this->LocalGenerator->GetStateSnapshot().GetDirectory()));
|
||||
linkLineComputer->SetForResponse(useResponseFileForLibs);
|
||||
linkLineComputer->SetUseWatcomQuote(useWatcomQuote);
|
||||
linkLineComputer->SetRelink(relink);
|
||||
|
||||
std::unique_ptr<cmLinkLineComputer> linkLineComputer(
|
||||
new cmLinkLineDeviceComputer(
|
||||
this->LocalGenerator,
|
||||
this->LocalGenerator->GetStateSnapshot().GetDirectory()));
|
||||
linkLineComputer->SetForResponse(useResponseFileForLibs);
|
||||
linkLineComputer->SetUseWatcomQuote(useWatcomQuote);
|
||||
linkLineComputer->SetRelink(relink);
|
||||
|
||||
this->CreateLinkLibs(linkLineComputer.get(), linkLibs,
|
||||
useResponseFileForLibs, depends);
|
||||
}
|
||||
this->CreateLinkLibs(linkLineComputer.get(), linkLibs,
|
||||
useResponseFileForLibs, depends);
|
||||
|
||||
// Construct object file lists that may be needed to expand the
|
||||
// rule.
|
||||
|
||||
Reference in New Issue
Block a user