diff options
author | Brad King <brad.king@kitware.com> | 2019-06-26 11:00:55 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-06-26 11:02:11 (GMT) |
commit | c86476549653f9915a4b9f4cc32d3e569f959d38 (patch) | |
tree | fc2ab121700d7511c5334900d40627c6eda8c9ff /Source | |
parent | b51b6cc5721779db6bcd9273db6ad2bf40e40c94 (diff) | |
parent | eda4c43879522438622ad75a5204666011198203 (diff) | |
download | CMake-c86476549653f9915a4b9f4cc32d3e569f959d38.zip CMake-c86476549653f9915a4b9f4cc32d3e569f959d38.tar.gz CMake-c86476549653f9915a4b9f4cc32d3e569f959d38.tar.bz2 |
Merge topic 'ninja-nvcc-rsp'
eda4c43879 Ninja: Fix CUDA device linking when using response files
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3482
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 15 |
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"; |