summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/configure/configureapp.cpp20
-rw-r--r--tools/configure/configureapp.h2
2 files changed, 19 insertions, 3 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index c54bc9426e..d4ea0f6d04 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -83,7 +83,7 @@ static inline void promptKeyPress()
exit(0); // Exit cleanly for Ctrl+C
}
-Configure::Configure(int& argc, char** argv)
+Configure::Configure(int& argc, char** argv) : verbose(0)
{
// Default values for indentation
optionIndent = 4;
@@ -383,6 +383,7 @@ void Configure::parseCmdLine()
configCmdLine.clear();
reloadCmdLine();
}
+
else if (configCmdLine.at(i) == "-loadconfig") {
++i;
if (i != argCount) {
@@ -420,6 +421,10 @@ void Configure::parseCmdLine()
|| configCmdLine.at(i) == "-?")
dictionary[ "HELP" ] = "yes";
+ else if (configCmdLine.at(i) == "-v" || configCmdLine.at(i) == "-verbose") {
+ ++verbose;
+ }
+
else if (configCmdLine.at(i) == "-qconfig") {
++i;
if (i == argCount)
@@ -2058,6 +2063,7 @@ bool Configure::displayHelp()
desc( "-loadconfig <config>", "Run configure with the parameters from file configure_<config>.cache.");
desc( "-saveconfig <config>", "Run configure and save the parameters in file configure_<config>.cache.");
desc( "-redo", "Run configure with the same parameters as last time.\n");
+ desc( "-v, -verbose", "Run configure tests with verbose output.\n");
// Qt\Windows CE only options go below here -----------------------------------------------------------------------------
desc("Qt for Windows CE only:\n\n");
@@ -3377,7 +3383,7 @@ bool Configure::tryCompileProject(const QString &projectPath, const QString &ext
}
// run qmake
- QString command = QString("%1 %2 %3 2>&1")
+ QString command = QString("%1 %2 %3")
.arg(QDir::toNativeSeparators(QDir(newpwd).relativeFilePath(buildPath + "/bin/qmake.exe")),
QDir::toNativeSeparators(sourcePath + "/config.tests/" + projectPath),
extraOptions);
@@ -3389,6 +3395,11 @@ bool Configure::tryCompileProject(const QString &projectPath, const QString &ext
addSysroot(&command);
}
+ if (verbose)
+ cout << qPrintable(command) << endl;
+ else
+ command += " 2>&1";
+
int code = 0;
QString output = Environment::execute(command, &code);
//cout << output << endl;
@@ -3398,7 +3409,10 @@ bool Configure::tryCompileProject(const QString &projectPath, const QString &ext
command = dictionary[ "MAKE" ];
if (command.contains("nmake") || command.contains("jom"))
command += " /NOLOGO";
- command += " -s 2>&1";
+ if (verbose)
+ cout << qPrintable(command) << endl;
+ else
+ command += " -s 2>&1";
output = Environment::execute(command, &code);
//cout << output << endl;
diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h
index de8d1a2469..78cc118a9d 100644
--- a/tools/configure/configureapp.h
+++ b/tools/configure/configureapp.h
@@ -93,6 +93,8 @@ public:
private:
bool checkAngleAvailability(QString *errorMessage = 0) const;
+ int verbose;
+
// Our variable dictionaries
QMap<QString,QString> dictionary;
QStringList allBuildParts;