mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-09 23:59:53 -05:00
Ninja: Fix CUDA device linking when using response files
Fix the logic added by commit d91b5a72cd (Ninja: Add support for CUDA
nvcc response files, 2019-05-30, v3.15.0-rc1~8^2) to always use the CUDA
compiler response file flag for response files during device linking.
This commit is contained in:
committed by
Brad King
parent
5c7880956f
commit
eda4c43879
@@ -171,20 +171,9 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkRule(bool useResponseFile)
|
||||
|
||||
vars.Language = "CUDA";
|
||||
|
||||
std::string responseFlag;
|
||||
|
||||
std::string cmakeVarLang = "CMAKE_";
|
||||
cmakeVarLang += this->TargetLinkLanguage;
|
||||
|
||||
// build response file name
|
||||
std::string cmakeLinkVar = cmakeVarLang + "_RESPONSE_FILE_LINK_FLAG";
|
||||
const char* flag = GetMakefile()->GetDefinition(cmakeLinkVar);
|
||||
|
||||
if (flag) {
|
||||
responseFlag = flag;
|
||||
} else if (this->TargetLinkLanguage != "CUDA") {
|
||||
responseFlag = "@";
|
||||
}
|
||||
std::string responseFlag = this->GetMakefile()->GetSafeDefinition(
|
||||
"CMAKE_CUDA_RESPONSE_FILE_LINK_FLAG");
|
||||
|
||||
if (!useResponseFile || responseFlag.empty()) {
|
||||
vars.Objects = "$in";
|
||||
|
||||
Reference in New Issue
Block a user