summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-03-22 12:49:30 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-03-22 12:50:05 (GMT)
commitb5d8a6de4815ead8b342f7862cd0726b13a03a47 (patch)
treeaa199b96979fcea99e5eb1d5ae038a920032a8ca /Source/cmNinjaNormalTargetGenerator.cxx
parent59032a38471c27c547ed76730c2643a5457e6abd (diff)
parentfeaea0658c9cbd4345f698a22452fe3a08a194a3 (diff)
downloadCMake-b5d8a6de4815ead8b342f7862cd0726b13a03a47.zip
CMake-b5d8a6de4815ead8b342f7862cd0726b13a03a47.tar.gz
CMake-b5d8a6de4815ead8b342f7862cd0726b13a03a47.tar.bz2
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.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index cd1407d..5552fa9 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()));
}