diff options
author | tophoo <30765654+tophoo@users.noreply.github.com> | 2023-11-08 15:34:19 (GMT) |
---|---|---|
committer | tophoo <30765654+tophoo@users.noreply.github.com> | 2023-11-16 15:29:02 (GMT) |
commit | 7a07887055d8acd1d367c640ca069734fdf49fa4 (patch) | |
tree | ce61650ca2c4d95594c122cda11c491c944e0609 /Source/cmQtAutoMocUic.cxx | |
parent | 7eb5ab2c63ce80b73e132710786cb5172ad60a0e (diff) | |
download | CMake-7a07887055d8acd1d367c640ca069734fdf49fa4.zip CMake-7a07887055d8acd1d367c640ca069734fdf49fa4.tar.gz CMake-7a07887055d8acd1d367c640ca069734fdf49fa4.tar.bz2 |
Autogen: Add support for response files for moc predef targets
Add support for response files for moc predef targets and make the limit when
to use response files for autogen targets configurable.
Diffstat (limited to 'Source/cmQtAutoMocUic.cxx')
-rw-r--r-- | Source/cmQtAutoMocUic.cxx | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx index a6d7e19..83256ed 100644 --- a/Source/cmQtAutoMocUic.cxx +++ b/Source/cmQtAutoMocUic.cxx @@ -5,6 +5,7 @@ #include <algorithm> #include <atomic> #include <cstddef> +#include <limits> #include <map> #include <mutex> #include <set> @@ -172,6 +173,8 @@ public: bool MultiConfig = false; IntegerVersion QtVersion = { 4, 0 }; unsigned int ThreadCount = 0; + unsigned int MaxCommandLineLength = + std::numeric_limits<unsigned int>::max(); // - Directories std::string AutogenBuildDir; std::string AutogenIncludeDir; @@ -811,7 +814,7 @@ void cmQtAutoMocUicT::JobT::MaybeWriteResponseFile( for (std::string const& str : cmd) { commandLineLength += str.length(); } - if (commandLineLength >= CommandLineLengthMax) { + if (commandLineLength >= this->BaseConst().MaxCommandLineLength) { // Command line exceeds maximum size allowed by OS // => create response file std::string const responseFile = cmStrCat(outputFile, ".rsp"); @@ -2380,6 +2383,10 @@ bool cmQtAutoMocUicT::InitFromInfo(InfoT const& info) !info.GetUInt("QT_VERSION_MINOR", this->BaseConst_.QtVersion.Minor, true) || !info.GetUInt("PARALLEL", this->BaseConst_.ThreadCount, false) || +#ifdef _WIN32 + !info.GetUInt("AUTOGEN_COMMAND_LINE_LENGTH_MAX", + this->BaseConst_.MaxCommandLineLength, false) || +#endif !info.GetString("BUILD_DIR", this->BaseConst_.AutogenBuildDir, true) || !info.GetStringConfig("INCLUDE_DIR", this->BaseConst_.AutogenIncludeDir, true) || |