1
0
Эх сурвалжийг харах

Merge topic 'ninja-many-subdirs' into release-4.1

6de40e7a4d Ninja: Fix regression with `.bat` wrapper around `ninja`

Acked-by: Kitware Robot <[email protected]>
Reviewed-by: Ben Boeckel <[email protected]>
Acked-by: Josef Angstenberger <[email protected]>
Acked-by: scivision <[email protected]>
Merge-request: !11111
Brad King 3 сар өмнө
parent
commit
18b3dd1e91

+ 3 - 2
Source/cmGlobalNinjaGenerator.cxx

@@ -714,8 +714,9 @@ void cmGlobalNinjaGenerator::CleanMetaData()
     auto output_it = outputs.begin();
     size_t static_arg_size = ninja_tool_arg_size + this->NinjaCommand.size() +
       this->GetCMakeInstance()->GetHomeOutputDirectory().size();
-    // The Windows command-line length limit is 32768.  Leave plenty.
-    constexpr size_t maximum_arg_size = 30000;
+    // The Windows command-line length limit is 32768, but if `ninja` is
+    // wrapped by a `.bat` file, the limit is 8192.  Leave plenty.
+    constexpr size_t maximum_arg_size = 8000;
     while (output_it != outputs.end()) {
       size_t total_arg_size = static_arg_size;
       std::vector<char const*> args;