summaryrefslogtreecommitdiffstats
path: root/tools/configure/environment.cpp
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2011-12-29 22:44:16 -0200
committerQt by Nokia <qt-info@nokia.com>2012-06-12 17:34:52 +0200
commitb4525b34074665ed472cd421077a1633110f16a7 (patch)
treec8b9aa1d8e3991c02400b3b93593812a61346222 /tools/configure/environment.cpp
parentf9c9d8aaa6684f596cf5675592782d5397e52093 (diff)
Add configure-time checking for the SSE and AVX features on Windows
Modify configure.exe to run some configure-time tests and check if the SSE and AVX compiler features are supported. The tests themselves required a bit of changes to compile with MSVC. The include in sse4_2.cpp was wrong. And for whatever reason, it didn't like the volatile variables, which GCC, Clang and ICC have been happy with. This should produce no effect in compilation, though: even dead code must be syntactically correct. We're not running the output. Change-Id: Ibe5d0904a378a7efed853c7215f88a2ddcefb1b3 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'tools/configure/environment.cpp')
-rw-r--r--tools/configure/environment.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/configure/environment.cpp b/tools/configure/environment.cpp
index 43cfc06599..0365340833 100644
--- a/tools/configure/environment.cpp
+++ b/tools/configure/environment.cpp
@@ -431,7 +431,7 @@ int Environment::execute(QStringList arguments, const QStringList &additionalEnv
Taken from qmake's system() command.
*/
-QString Environment::execute(const QString &command)
+QString Environment::execute(const QString &command, int *returnCode)
{
QString output;
FILE *proc = _popen(command.toLatin1().constData(), "r");
@@ -443,8 +443,11 @@ QString Environment::execute(const QString &command)
buff[read_in] = '\0';
output += buff;
}
- if (proc)
- _pclose(proc);
+ if (proc) {
+ int r = _pclose(proc);
+ if (returnCode)
+ *returnCode = r;
+ }
return output;
}