diff options
author | Eric Lemanissier <eric.lemanissier@gmail.com> | 2015-03-04 12:58:28 +0100 |
---|---|---|
committer | Eric Lemanissier <eric.lemanissier@gmail.com> | 2015-03-25 11:13:19 +0000 |
commit | b814d05101bbc35354388d5e46bd13df9e4a663e (patch) | |
tree | 42d10929c7962772d564f713dbdc03d9d9acd8a3 /tools/configure/environment.cpp | |
parent | b0c58c2bb4cde616302f98e4c64549ae2ae028cf (diff) |
Add mingw GCC Version to qconfig.pri
This change adds missing variables in mkspecs/qconfig.pri about gcc
compiler version when using mingw: QT_GCC_{MAJOR,MINOR,PATCH}_VERSION
This is needed in case CONFIG += c++14 is used.
Task-number: QTBUG-44142
Change-Id: I34c27f9154bb745a8ee75c777a0acbdbc5bda5a9
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'tools/configure/environment.cpp')
-rw-r--r-- | tools/configure/environment.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp index c08595e36b..63c1e8a1f0 100644 --- a/tools/configure/environment.cpp +++ b/tools/configure/environment.cpp @@ -163,6 +163,18 @@ Compiler Environment::compilerFromQMakeSpec(const QString &qmakeSpec) return CC_UNKNOWN; } +QString Environment::gccVersion() +{ + CompilerInfo *info = compilerInfo(CC_MINGW); + int returnValue = 0; + QString version = execute(QStringLiteral("%1 -dumpversion").arg(info->executable), &returnValue); + if (returnValue != 0) { + cout << "Could not get mingw version" << returnValue << qPrintable(version); + version.resize(0); + } + return version; +} + /*! Returns the enum of the compiler which was detected on the system. The compilers are detected in the order as entered into the |