summaryrefslogtreecommitdiffstats
path: root/qmake/library
diff options
context:
space:
mode:
Diffstat (limited to 'qmake/library')
-rw-r--r--qmake/library/qmakeglobals.cpp11
-rw-r--r--qmake/library/qmakeglobals.h2
2 files changed, 12 insertions, 1 deletions
diff --git a/qmake/library/qmakeglobals.cpp b/qmake/library/qmakeglobals.cpp
index 6a648e9ecf..f90ad905ee 100644
--- a/qmake/library/qmakeglobals.cpp
+++ b/qmake/library/qmakeglobals.cpp
@@ -134,6 +134,11 @@ QMakeGlobals::ArgumentReturn QMakeGlobals::addCommandLineArguments(
break;
default:
if (arg.startsWith(QLatin1Char('-'))) {
+ if (arg == QLatin1String("--")) {
+ state.extraargs = args.mid(*pos + 1);
+ *pos = args.size();
+ return ArgumentsOk;
+ }
if (arg == QLatin1String("-after"))
state.after = true;
else if (arg == QLatin1String("-config"))
@@ -179,6 +184,12 @@ void QMakeGlobals::commitCommandLineArguments(QMakeCmdLineParserState &state)
{
if (!state.preconfigs.isEmpty())
state.precmds << (fL1S("CONFIG += ") + state.preconfigs.join(QLatin1Char(' ')));
+ if (!state.extraargs.isEmpty()) {
+ QString extra = fL1S("QMAKE_EXTRA_ARGS =");
+ for (const QString &ea : qAsConst(state.extraargs))
+ extra += QLatin1Char(' ') + QMakeEvaluator::quoteValue(ProString(ea));
+ state.precmds << extra;
+ }
precmds = state.precmds.join(QLatin1Char('\n'));
if (!state.postconfigs.isEmpty())
state.postcmds << (fL1S("CONFIG += ") + state.postconfigs.join(QLatin1Char(' ')));
diff --git a/qmake/library/qmakeglobals.h b/qmake/library/qmakeglobals.h
index 79237e6ebe..96c39fa168 100644
--- a/qmake/library/qmakeglobals.h
+++ b/qmake/library/qmakeglobals.h
@@ -85,7 +85,7 @@ class QMAKE_EXPORT QMakeCmdLineParserState
public:
QMakeCmdLineParserState(const QString &_pwd) : pwd(_pwd), after(false) {}
QString pwd;
- QStringList precmds, preconfigs, postcmds, postconfigs;
+ QStringList precmds, preconfigs, postcmds, postconfigs, extraargs;
bool after;
void flush() { after = false; }