diff options
author | Brad King <brad.king@kitware.com> | 2017-03-22 12:49:30 +0000 |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-03-22 08:50:05 -0400 |
commit | b5d8a6de4815ead8b342f7862cd0726b13a03a47 (patch) | |
tree | aa199b96979fcea99e5eb1d5ae038a920032a8ca /Source/cmNinjaNormalTargetGenerator.cxx | |
parent | 59032a38471c27c547ed76730c2643a5457e6abd (diff) | |
parent | feaea0658c9cbd4345f698a22452fe3a08a194a3 (diff) | |
download | cmake-b5d8a6de4815ead8b342f7862cd0726b13a03a47.tar.gz |
Merge topic 'cuda_no_ninja_response_support'
feaea065 CUDA: Disable support for using response files.
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !596
Diffstat (limited to 'Source/cmNinjaNormalTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaNormalTargetGenerator.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx index cd1407df62..5552fa98f7 100644 --- a/Source/cmNinjaNormalTargetGenerator.cxx +++ b/Source/cmNinjaNormalTargetGenerator.cxx @@ -747,11 +747,10 @@ void cmNinjaNormalTargetGenerator::WriteDeviceLinkStatement() cmGlobalNinjaGenerator& globalGen = *this->GetGlobalGenerator(); - int commandLineLengthLimit = -1; - if (!this->ForceResponseFile()) { - commandLineLengthLimit = calculateCommandLineLengthLimit( - globalGen.GetRuleCmdLength(this->LanguageLinkerDeviceRule())); - } + // Device linking currently doesn't support response files so + // do not check if the user has explicitly forced a response file. + int const commandLineLengthLimit = calculateCommandLineLengthLimit( + globalGen.GetRuleCmdLength(this->LanguageLinkerDeviceRule())); const std::string rspfile = std::string(cmake::GetCMakeFilesDirectoryPostSlash()) + @@ -1033,8 +1032,10 @@ void cmNinjaNormalTargetGenerator::WriteLinkStatement() } cmGlobalNinjaGenerator& globalGen = *this->GetGlobalGenerator(); + bool const lang_supports_response = + !(this->TargetLinkLanguage == "RC" || this->TargetLinkLanguage == "CUDA"); int commandLineLengthLimit = -1; - if (!this->ForceResponseFile()) { + if (!lang_supports_response || !this->ForceResponseFile()) { commandLineLengthLimit = calculateCommandLineLengthLimit( globalGen.GetRuleCmdLength(this->LanguageLinkerRule())); } |