summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaNormalTargetGenerator.cxx
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2017-03-21 12:38:45 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2017-03-21 15:09:18 (GMT)
commitfeaea0658c9cbd4345f698a22452fe3a08a194a3 (patch)
treee004dd2daf16f04e4f00c54af8c26abc0eefc2fe /Source/cmNinjaNormalTargetGenerator.cxx
parente1adec32b8325fb731da084e99acd6070f5e39bf (diff)
downloadCMake-feaea0658c9cbd4345f698a22452fe3a08a194a3.zip
CMake-feaea0658c9cbd4345f698a22452fe3a08a194a3.tar.gz
CMake-feaea0658c9cbd4345f698a22452fe3a08a194a3.tar.bz2
CUDA: Disable support for using response files.
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 b172478..4fc664d 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -753,11 +753,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()) +
@@ -1048,8 +1047,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()));
}