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 ="); foreach (const QString &ea, state.extraargs) extra += QLatin1Char(' ') + QMakeEvaluator::quoteValue(ProString(ea)); state.precmds << extra; }
void QMakeGlobals::commitCommandLineArguments(QMakeCmdLineParserState &state) { if (!state.preconfigs.isEmpty()) state.precmds << (fL1S("CONFIG += ") + state.preconfigs.join(fL1S(" "))); precmds = state.precmds.join(fL1S("\n")); if (!state.postconfigs.isEmpty()) state.postcmds << (fL1S("CONFIG += ") + state.postconfigs.join(fL1S(" "))); postcmds = state.postcmds.join(fL1S("\n")); if (xqmakespec.isEmpty()) xqmakespec = qmakespec; }
void QMakeGlobals::setCommandLineArguments(const QStringList &args) { QStringList _precmds, _preconfigs, _postcmds, _postconfigs; bool after = false; bool isConf = false; foreach (const QString &arg, args) { if (isConf) { isConf = false; if (after) _postconfigs << arg; else _preconfigs << arg; } else if (arg.startsWith(QLatin1Char('-'))) { if (arg == QLatin1String("-after")) { after = true; } else if (arg == QLatin1String("-config")) { isConf = true; } else if (arg == QLatin1String("-win32")) { dir_sep = QLatin1Char('\\'); } else if (arg == QLatin1String("-unix")) { dir_sep = QLatin1Char('/'); } } else if (arg.contains(QLatin1Char('='))) { if (after) _postcmds << arg; else _precmds << arg; } } if (!_preconfigs.isEmpty()) _precmds << (fL1S("CONFIG += ") + _preconfigs.join(fL1S(" "))); precmds = _precmds.join(fL1S("\n")); if (!_postconfigs.isEmpty()) _postcmds << (fL1S("CONFIG += ") + _postconfigs.join(fL1S(" "))); postcmds = _postcmds.join(fL1S("\n")); }