CUDA: Avoid unnecessary allocation and GetLinkLanguage()

There's no reason to allocate the cmNinjaLinkLineDeviceComputer on the heap.
We can also assume the link language as CUDA in cmLocalGenerator::GetDeviceLinkFlags().
This commit is contained in:
Raul Tambre
2021-11-07 21:28:08 +02:00
parent 5b0693411e
commit cf7e68087d
3 changed files with 11 additions and 15 deletions
+1 -1
View File
@@ -496,7 +496,7 @@ public:
/** Fill out these strings for the given target. Libraries to link,
* flags, and linkflags. */
void GetDeviceLinkFlags(cmLinkLineComputer* linkLineComputer,
void GetDeviceLinkFlags(cmLinkLineComputer& linkLineComputer,
const std::string& config, std::string& linkLibs,
std::string& linkFlags, std::string& frameworkPath,
std::string& linkPath, cmGeneratorTarget* target);