diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-06-17 11:21:40 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-06-19 20:01:45 +0200 |
commit | 1aaeb9538b8f001cee80eef75a15176e0d3910ed (patch) | |
tree | d31e4ade8b3d6d0fb7b26df4dc1017c12c5689c1 /tools/configure | |
parent | 0343b926608a4014ef386b3b21be9a0940d9f8e8 (diff) |
complain about bad arguments to -make/-nomake
Task-number: QTBUG-5366
Change-Id: I461a6c85fcee4a0216571d294171652b05ee6a34
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Diffstat (limited to 'tools/configure')
-rw-r--r-- | tools/configure/configureapp.cpp | 16 | ||||
-rw-r--r-- | tools/configure/configureapp.h | 1 |
2 files changed, 15 insertions, 2 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 50e491f20c..0ac3730b4e 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -171,6 +171,8 @@ Configure::Configure(int& argc, char** argv) } defaultBuildParts << QStringLiteral("libs") << QStringLiteral("tools") << QStringLiteral("examples"); + allBuildParts = defaultBuildParts; + allBuildParts << QStringLiteral("tests"); dictionary[ "QT_SOURCE_TREE" ] = sourcePath; dictionary[ "QT_BUILD_TREE" ] = buildPath; dictionary[ "QT_INSTALL_PREFIX" ] = installPath; @@ -1001,12 +1003,22 @@ void Configure::parseCmdLine() ++i; if (i == argCount) break; - buildParts += configCmdLine.at(i); + QString part = configCmdLine.at(i); + if (!allBuildParts.contains(part)) { + cout << "Unknown part " << part << " passed to -make." << endl; + dictionary["DONE"] = "error"; + } + buildParts += part; } else if (configCmdLine.at(i) == "-nomake") { ++i; if (i == argCount) break; - nobuildParts.append(configCmdLine.at(i)); + QString part = configCmdLine.at(i); + if (!allBuildParts.contains(part)) { + cout << "Unknown part " << part << " passed to -nomake." << endl; + dictionary["DONE"] = "error"; + } + nobuildParts += part; } else if (configCmdLine.at(i) == "-skip") { diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h index 3014e409f9..8f95e1fb95 100644 --- a/tools/configure/configureapp.h +++ b/tools/configure/configureapp.h @@ -104,6 +104,7 @@ private: // Our variable dictionaries QMap<QString,QString> dictionary; + QStringList allBuildParts; QStringList defaultBuildParts; QStringList buildParts; QStringList nobuildParts; |