mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
Autogen: Use new API for limiting autogen command line lengths
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user