mirror of
https://github.com/reactos/CMake.git
synced 2024-12-12 13:56:00 +00:00
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.
This commit is contained in:
parent
fc58819150
commit
4ef0eedb49
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user