summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
authorYurii Batrak <yuriib@met.no>2017-07-10 10:18:02 (GMT)
committerYurii Batrak <yuriib@met.no>2017-07-10 11:08:18 (GMT)
commit4ef0eedb496cd60a9fa9c9f51e02e167c8a1e64a (patch)
tree20c943e129653cb4f245974f8f016afa5c2981d4 /Source/cmNinjaTargetGenerator.cxx
parentfc58819150a126d87bf17ad812bb6f62f28ae42b (diff)
downloadCMake-4ef0eedb496cd60a9fa9c9f51e02e167c8a1e64a.zip
CMake-4ef0eedb496cd60a9fa9c9f51e02e167c8a1e64a.tar.gz
CMake-4ef0eedb496cd60a9fa9c9f51e02e167c8a1e64a.tar.bz2
Ninja: always use response file for cmake_ninja_dyndep
Command line argument passed to the internal tool "cmake_ninja_dyndep" could hit MAX_ARG_STRLEN on Linux for projects with a large code base. To prevent such problems, a response file was opted for argument transfer in all cases, not only on Windows.
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx10
1 files changed, 2 insertions, 8 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx
index 7c57ef0..79191ec 100644
--- a/Source/cmNinjaTargetGenerator.cxx
+++ b/Source/cmNinjaTargetGenerator.cxx
@@ -557,17 +557,11 @@ void cmNinjaTargetGenerator::WriteCompileRule(const std::string& lang)
// Write the rule for ninja dyndep file generation.
std::vector<std::string> ddCmds;
-#ifdef _WIN32
- // Windows command line length is limited -> use response file for dyndep
- // rules
+ // Command line length is almost always limited -> use response file for
+ // dyndep rules
std::string ddRspFile = "$out.rsp";
std::string ddRspContent = "$in";
std::string ddInput = "@" + ddRspFile;
-#else
- std::string ddRspFile;
- std::string ddRspContent;
- std::string ddInput = "$in";
-#endif
// Run CMake dependency scanner on preprocessed output.
std::string const cmake = this->GetLocalGenerator()->ConvertToOutputFormat(