summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-04-05 15:37:32 (GMT)
committerBrad King <brad.king@kitware.com>2018-04-05 16:51:21 (GMT)
commit8592c6326bb43ec46cf43e77e51d62212c145dfe (patch)
tree4dcb38479fda51b335cfa0ba169972a08578695e /Source/cmNinjaTargetGenerator.cxx
parente0aa060352f0ea663500e87086192f52440952b9 (diff)
downloadCMake-8592c6326bb43ec46cf43e77e51d62212c145dfe.zip
CMake-8592c6326bb43ec46cf43e77e51d62212c145dfe.tar.gz
CMake-8592c6326bb43ec46cf43e77e51d62212c145dfe.tar.bz2
cmNinjaTargetGenerator: Move force-rspfile check to earlier
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index d982020..f213cc0 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -867,6 +867,11 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
std::string const objectFileDir =
cmSystemTools::GetFilenamePath(objectFileName);
+ bool const lang_supports_response =
+ !(language == "RC" || language == "CUDA");
+ int const commandLineLengthLimit =
+ ((lang_supports_response && this->ForceResponseFile())) ? -1 : 0;
+
cmNinjaVars vars;
vars["FLAGS"] = this->ComputeFlagsForObject(source, language);
vars["DEFINES"] = this->ComputeDefines(source, language);
@@ -1036,10 +1041,6 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
this->SetMsvcTargetPdbVariable(vars);
- bool const lang_supports_response =
- !(language == "RC" || language == "CUDA");
- int const commandLineLengthLimit =
- ((lang_supports_response && this->ForceResponseFile())) ? -1 : 0;
std::string const rspfile = objectFileName + ".rsp";
this->GetGlobalGenerator()->WriteBuild(