Use jom in tst_qmake.
authorFriedemann Kleint <Friedemann.Kleint@digia.com>
Fri, 5 Oct 2012 08:12:08 +0000 (10:12 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Mon, 8 Oct 2012 06:46:21 +0000 (08:46 +0200)
Speed up compiling the tests.

Task-number: 26023

Change-Id: Ib5e872cc6cde09ac90f426a8f6e7cfea509d02e2
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
tests/auto/tools/qmake/tst_qmake.cpp

index ca4c11e..6e2eb31 100644 (file)
@@ -44,6 +44,7 @@
 #include "testcompiler.h"
 
 #include <QObject>
+#include <QStandardPaths>
 #include <QDir>
 
 class tst_qmake : public QObject
@@ -111,7 +112,12 @@ void tst_qmake::initTestCase()
     QString binpath = QLibraryInfo::location(QLibraryInfo::BinariesPath);
     QString cmd = QString("%1/qmake").arg(binpath);
 #ifdef Q_CC_MSVC
-    test_compiler.setBaseCommands( "nmake", cmd );
+    const QString jom = QStandardPaths::findExecutable(QLatin1String("jom.exe"));
+    if (jom.isEmpty()) {
+        test_compiler.setBaseCommands( QLatin1String("nmake"), cmd );
+    } else {
+        test_compiler.setBaseCommands( jom, cmd );
+    }
 #elif defined(Q_CC_MINGW)
     test_compiler.setBaseCommands( "mingw32-make", cmd );
 #elif defined(Q_OS_WIN) && defined(Q_CC_GNU)