summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorBradley T. Hughes <bradley.hughes@nokia.com>2012-02-27 11:21:10 +0100
committerQt by Nokia <qt-info@nokia.com>2012-02-27 20:52:45 +0100
commitfa5cf01e7468e53508b15726625fd681892119a4 (patch)
tree383f26cff51b0d66d6888bd74962d4795216d8f5 /tools
parent494ed1d53603e82ecdc20d766464be2b817145ae (diff)
Make configure.exe only detect each compiler once
After commit e0acf6504356f14a6352b16ffed7b59453914863, configure.exe built with the x64 compiler could detect the same compiler twice, breaking the -platform detection even when only one compiler is in the path. Fix this by taking advantage of the CompilerInfo struct ordering and ignore detection of the same compiler. Change-Id: I583230520d2e0859196f9d7c8af31adbb981a6ca Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r--tools/configure/environment.cpp28
1 files changed, 24 insertions, 4 deletions
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp
index ae378f6b41..b9af9eca8f 100644
--- a/tools/configure/environment.cpp
+++ b/tools/configure/environment.cpp
@@ -162,8 +162,18 @@ Compiler Environment::detectCompiler()
QStringList::iterator it;
for(it = pathlist.begin(); it != pathlist.end(); ++it) {
if((*it).contains(productPath)) {
- ++installed;
- detectedCompiler = compiler_info[i].compiler;
+ if (detectedCompiler != compiler_info[i].compiler) {
+ ++installed;
+ detectedCompiler = compiler_info[i].compiler;
+ }
+ /* else {
+
+ We detected the same compiler again, which happens when
+ configure is build with the 64-bit compiler. Skip the
+ duplicate so that we don't think it's installed twice.
+
+ }
+ */
break;
}
}
@@ -175,8 +185,18 @@ Compiler Environment::detectCompiler()
for(int i = 0; compiler_info[i].compiler; ++i) {
QString executable = QString(compiler_info[i].executable).toLower();
if (executable.length() && Environment::detectExecutable(executable)) {
- ++installed;
- detectedCompiler = compiler_info[i].compiler;
+ if (detectedCompiler != compiler_info[i].compiler) {
+ ++installed;
+ detectedCompiler = compiler_info[i].compiler;
+ }
+ /* else {
+
+ We detected the same compiler again, which happens when
+ configure is build with the 64-bit compiler. Skip the
+ duplicate so that we don't think it's installed twice.
+
+ }
+ */
break;
}
}