summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorFrancisco Facioni <fran6co@gmail.com>2020-02-19 17:33:35 +0000
committerBrad King <brad.king@kitware.com>2020-02-24 13:31:33 -0500
commit738f3f23aa50749f27a0ee6ea61e7e0f7e52313a (patch)
tree16b7e6a7ce94c67ea953f0eec64b6fd10a790f42 /Source
parentebea30a1edced8d74c42b35c129a3f32d553115c (diff)
downloadcmake-738f3f23aa50749f27a0ee6ea61e7e0f7e52313a.tar.gz
Ninja: Do not use nvcc response files with non-nvcc tools
Since commit d91b5a72cd (Ninja: Add support for CUDA nvcc response files, 2019-05-30, v3.15.0-rc1~8^2) we use NVCC's `--options-file` option to avoid long link command lines via a response file. However, for non-device linking the host tools are used and the option does not make sense. Update the logic to use `--options-file` only for device linking. Linking with the host tools already has its own logic for response files. Fixes: #19954
Diffstat (limited to 'Source')
-rw-r--r--Source/cmNinjaNormalTargetGenerator.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index b7b822ab1b..28c0787184 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -174,7 +174,7 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkRule(bool useResponseFile)
// build response file name
std::string responseFlag = this->GetMakefile()->GetSafeDefinition(
- "CMAKE_CUDA_RESPONSE_FILE_LINK_FLAG");
+ "CMAKE_CUDA_RESPONSE_FILE_DEVICE_LINK_FLAG");
if (!useResponseFile || responseFlag.empty()) {
vars.Objects = "$in";
@@ -290,7 +290,7 @@ void cmNinjaNormalTargetGenerator::WriteLinkRule(bool useResponseFile)
if (flag) {
responseFlag = flag;
- } else if (this->TargetLinkLanguage != "CUDA") {
+ } else {
responseFlag = "@";
}