diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-11-16 08:53:38 (GMT) |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2011-11-16 13:31:29 (GMT) |
commit | d4150975af620e2889cc58bd476bac6b4d101db3 (patch) | |
tree | 15e000be38cc530e25f68066ade6581d14a4f60d /tools/configure/configureapp.cpp | |
parent | 2326a8d878e0d18473c27ddd54880621518b6e6e (diff) | |
download | Qt-d4150975af620e2889cc58bd476bac6b4d101db3.zip Qt-d4150975af620e2889cc58bd476bac6b4d101db3.tar.gz Qt-d4150975af620e2889cc58bd476bac6b4d101db3.tar.bz2 |
Windows: Add gcc 4.6.
- Add gcc 4.6 mkspec for > 4.4 (win32-g++-4.6)
- Add detection of g++ version and 64bit to configure.
Reviewed-by: mariusSO
Diffstat (limited to 'tools/configure/configureapp.cpp')
-rw-r--r-- | tools/configure/configureapp.cpp | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index e6d8526..60996e3 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -1263,17 +1263,18 @@ void Configure::parseCmdLine() } cout << "See the README file for a list of supported operating systems and compilers." << endl; } else { - if (dictionary[ "QMAKESPEC" ].endsWith("-icc") || - dictionary[ "QMAKESPEC" ].endsWith("-msvc") || - dictionary[ "QMAKESPEC" ].endsWith("-msvc.net") || - dictionary[ "QMAKESPEC" ].endsWith("-msvc2002") || - dictionary[ "QMAKESPEC" ].endsWith("-msvc2003") || - dictionary[ "QMAKESPEC" ].endsWith("-msvc2005") || - dictionary[ "QMAKESPEC" ].endsWith("-msvc2008") || - dictionary[ "QMAKESPEC" ].endsWith("-msvc2010")) { + const QString qmakeSpec = dictionary[ "QMAKESPEC" ]; + if (qmakeSpec.endsWith("-icc") || + qmakeSpec.endsWith("-msvc") || + qmakeSpec.endsWith("-msvc.net") || + qmakeSpec.endsWith("-msvc2002") || + qmakeSpec.endsWith("-msvc2003") || + qmakeSpec.endsWith("-msvc2005") || + qmakeSpec.endsWith("-msvc2008") || + qmakeSpec.endsWith("-msvc2010")) { if (dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "nmake"; dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32"; - } else if (dictionary[ "QMAKESPEC" ] == QString("win32-g++")) { + } else if (qmakeSpec.contains("win32-g++")) { if (dictionary[ "MAKE" ].isEmpty()) dictionary[ "MAKE" ] = "mingw32-make"; if (Environment::detectExecutable("sh.exe")) { dictionary[ "QMAKEMAKEFILE" ] = "Makefile.win32-g++-sh"; @@ -1329,7 +1330,7 @@ void Configure::parseCmdLine() } } - useUnixSeparators = (dictionary["QMAKESPEC"] == "win32-g++"); + useUnixSeparators = dictionary["QMAKESPEC"].contains("win32-g++"); // Allow tests for private classes to be compiled against internal builds if (dictionary["BUILDDEV"] == "yes") @@ -2201,7 +2202,9 @@ bool Configure::checkAvailability(const QString &part) } else if (part == "MULTIMEDIA" || part == "SCRIPT" || part == "SCRIPTTOOLS" || part == "DECLARATIVE") { available = true; } else if (part == "WEBKIT") { - available = (dictionary.value("QMAKESPEC") == "win32-msvc2005") || (dictionary.value("QMAKESPEC") == "win32-msvc2008") || (dictionary.value("QMAKESPEC") == "win32-msvc2010") || (dictionary.value("QMAKESPEC") == "win32-g++"); + const QString qmakeSpec = dictionary.value("QMAKESPEC"); + available = qmakeSpec == "win32-msvc2005" || qmakeSpec == "win32-msvc2008" || + qmakeSpec == "win32-msvc2010" || qmakeSpec.startsWith("win32-g++"); if (dictionary[ "SHARED" ] == "no") { cout << endl << "WARNING: Using static linking will disable the WebKit module." << endl << endl; @@ -2376,7 +2379,7 @@ bool Configure::verifyConfiguration() dictionary["SQL_SQLITE_LIB"] = "qt"; // Set to Qt's bundled lib an continue } - if (dictionary["QMAKESPEC"].endsWith("-g++") + if (dictionary["QMAKESPEC"].contains("-g++") && dictionary["SQL_OCI"] != "no") { cout << "WARNING: Qt does not support compiling the Oracle database driver with" << endl << "MinGW, due to lack of such support from Oracle. Consider disabling the" << endl @@ -2456,7 +2459,7 @@ void Configure::generateBuildKey() QString spec = dictionary["QMAKESPEC"]; QString compiler = "msvc"; // ICC is compatible - if (spec.endsWith("-g++")) + if (spec.contains("-g++")) compiler = "mingw"; else if (spec.endsWith("-borland")) compiler = "borland"; @@ -2874,7 +2877,7 @@ void Configure::generateOutputVars() if (!qmakeStylePlugins.isEmpty()) qmakeVars += QString("style-plugins += ") + qmakeStylePlugins.join(" "); - if (dictionary["QMAKESPEC"].endsWith("-g++")) { + if (dictionary["QMAKESPEC"].contains("-g++")) { QString includepath = qgetenv("INCLUDE"); bool hasSh = Environment::detectExecutable("sh.exe"); QChar separator = (!includepath.contains(":\\") && hasSh ? QChar(':') : QChar(';')); |