diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-01-03 19:10:14 +0100 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2018-03-14 15:32:35 +0000 |
commit | dd482d681f8909c77614638eb34db3e296b60df5 (patch) | |
tree | 46a12fbb142b971676ddeb9acc0291ed46fb006f /src | |
parent | 897305f35627583a646080c8fbc7984fcacbe2ea (diff) |
qmake: don't pass qmake configure arguments to sub-projects
the arguments after '--' are by definition meant only for the top-level
project, as that's where configure is invoked from. passing them to
sub-projects just adds noise to the make output and misleads users.
note that this specifically does not support qmake -r, which will break
if the subprojects rely on the arguments being absent. this isn't a
problem, because the qt build doesn't support qmake -r anyway.
note on cherry-picking: qt creator parses projects like qmake -r would,
so this is hypothetically more of a problem here. we presume that nobody
would actually include configure arguments in their build configuration,
which may or may not be true ...
Change-Id: I7ecff6212ce3137526005fc324a4a7ae45e3345e
(cherry picked from qtbase/34cc41d8a17e6e30f01f22c5d382c28d49ae37e1)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/shared/proparser/qmakeglobals.cpp | 2 | ||||
-rw-r--r-- | src/shared/proparser/qmakeglobals.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/proparser/qmakeglobals.cpp b/src/shared/proparser/qmakeglobals.cpp index a50fa5437a..04ff561e9d 100644 --- a/src/shared/proparser/qmakeglobals.cpp +++ b/src/shared/proparser/qmakeglobals.cpp @@ -135,7 +135,7 @@ QMakeGlobals::ArgumentReturn QMakeGlobals::addCommandLineArguments( if (arg.startsWith(QLatin1Char('-'))) { if (arg == QLatin1String("--")) { state.extraargs = args.mid(*pos + 1); - *pos = args.size(); + args.erase(args.begin() + *pos, args.end()); return ArgumentsOk; } if (arg == QLatin1String("-after")) diff --git a/src/shared/proparser/qmakeglobals.h b/src/shared/proparser/qmakeglobals.h index 90e2b007cc..7e9cf09281 100644 --- a/src/shared/proparser/qmakeglobals.h +++ b/src/shared/proparser/qmakeglobals.h @@ -101,7 +101,7 @@ public: QProcessEnvironment environment; #endif QString qmake_abslocation; - QStringList qmake_args; + QStringList qmake_args, qmake_extra_args; QString qtconf; QString qmakespec, xqmakespec; |