summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
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 5866950..e233f12 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -410,7 +410,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";
@@ -935,9 +936,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(