summaryrefslogtreecommitdiff
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2017-03-21 08:38:45 -0400
committerRobert Maynard <robert.maynard@kitware.com>2017-03-21 11:09:18 -0400
commitfeaea0658c9cbd4345f698a22452fe3a08a194a3 (patch)
treee004dd2daf16f04e4f00c54af8c26abc0eefc2fe /Source/cmNinjaTargetGenerator.cxx
parente1adec32b8325fb731da084e99acd6070f5e39bf (diff)
downloadcmake-feaea0658c9cbd4345f698a22452fe3a08a194a3.tar.gz
CUDA: Disable support for using response files.
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index b1f26e480c..c9520263dc 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -405,7 +405,8 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang)
std::string rspcontent;
std::string responseFlag;
- if (lang != "RC" && this->ForceResponseFile()) {
+ bool const lang_supports_response = !(lang == "RC" || lang == "CUDA");
+ if (lang_supports_response && this->ForceResponseFile()) {
rspfile = "$RSP_FILE";
responseFlag = "@" + rspfile;
rspcontent = " $DEFINES $INCLUDES $FLAGS";
@@ -930,9 +931,10 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
this->SetMsvcTargetPdbVariable(vars);
- bool const isRC = (language == "RC");
+ bool const lang_supports_response =
+ !(language == "RC" || language == "CUDA");
int const commandLineLengthLimit =
- ((!isRC && this->ForceResponseFile())) ? -1 : 0;
+ ((lang_supports_response && this->ForceResponseFile())) ? -1 : 0;
std::string const rspfile = objectFileName + ".rsp";
this->GetGlobalGenerator()->WriteBuild(