Autogen: Use new API for limiting autogen command line lengths

This commit is contained in:
tophoo
2023-11-08 16:35:27 +01:00
parent 7a07887055
commit 232610e60e
3 changed files with 2 additions and 12 deletions

View File

@@ -76,13 +76,6 @@ static void MergeOptions(std::vector<std::string>& baseOpts,
unsigned int const cmQtAutoGen::ParallelMax = 64;
#ifdef _WIN32
// Actually 32767 (see
// https://devblogs.microsoft.com/oldnewthing/20031210-00/?p=41553) but we
// allow for a small margin
size_t const cmQtAutoGen::CommandLineLengthMax = 32000;
#endif
cm::string_view cmQtAutoGen::GeneratorName(GenT genType)
{
switch (genType) {

View File

@@ -64,11 +64,6 @@ public:
/// @brief Maximum number of parallel threads/processes in a generator
static unsigned int const ParallelMax;
#ifdef _WIN32
/// @brief Maximum number of characters on command line
static size_t const CommandLineLengthMax;
#endif
/// @brief Returns the generator name
static cm::string_view GeneratorName(GenT genType);
/// @brief Returns the generator name in upper case

View File

@@ -887,6 +887,8 @@ void cmQtAutoMocUicT::JobMocPredefsT::Process()
cm::append(cmd, this->MocConst().OptionsDefinitions);
// Add includes
cm::append(cmd, this->MocConst().OptionsIncludes);
// Check if response file is necessary
MaybeWriteResponseFile(this->MocConst().PredefsFileAbs, cmd);
// Execute command
if (!this->RunProcess(GenT::MOC, result, cmd, reason.get())) {
this->LogCommandError(GenT::MOC,