From 232610e60ec5546d8c8460a006af9417004def00 Mon Sep 17 00:00:00 2001 From: tophoo <30765654+tophoo@users.noreply.github.com> Date: Wed, 8 Nov 2023 16:35:27 +0100 Subject: Autogen: Use new API for limiting autogen command line lengths --- Source/cmQtAutoGen.cxx | 7 ------- Source/cmQtAutoGen.h | 5 ----- Source/cmQtAutoMocUic.cxx | 2 ++ 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/Source/cmQtAutoGen.cxx b/Source/cmQtAutoGen.cxx index adbdba8..0a394b5 100644 --- a/Source/cmQtAutoGen.cxx +++ b/Source/cmQtAutoGen.cxx @@ -76,13 +76,6 @@ static void MergeOptions(std::vector& 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) { diff --git a/Source/cmQtAutoGen.h b/Source/cmQtAutoGen.h index d111422..5a23ae9 100644 --- a/Source/cmQtAutoGen.h +++ b/Source/cmQtAutoGen.h @@ -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 diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx index 83256ed..a49125e 100644 --- a/Source/cmQtAutoMocUic.cxx +++ b/Source/cmQtAutoMocUic.cxx @@ -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, -- cgit v0.12