summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorFrancisco Facioni <francisco.facioni@hawkeyeinnovations.com>2019-06-25 16:59:08 (GMT)
committerBrad King <brad.king@kitware.com>2019-06-25 18:30:36 (GMT)
commiteda4c43879522438622ad75a5204666011198203 (patch)
tree552e442e6b3e5fcd239f8d4815dcfbe4563972c3 /Source/cmNinjaNormalTargetGenerator.cxx
parent5c7880956f9b3daea561c7bf817b27aa47b53dd0 (diff)
downloadCMake-eda4c43879522438622ad75a5204666011198203.zip
CMake-eda4c43879522438622ad75a5204666011198203.tar.gz
CMake-eda4c43879522438622ad75a5204666011198203.tar.bz2
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.
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx15
1 files changed, 2 insertions, 13 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index 7ad8ab3..f65abc8 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -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";