From dd482d681f8909c77614638eb34db3e296b60df5 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Tue, 3 Jan 2017 19:10:14 +0100 Subject: [PATCH] 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 Reviewed-by: Tobias Hunger --- src/shared/proparser/qmakeglobals.cpp | 2 +- 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 a50fa5437a0..04ff561e9d6 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 90e2b007ccd..7e9cf09281d 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;