path: root/config.tests/arch
diff options
authorThiago Macieira <>2012-03-27 14:43:45 -0300
committerQt by Nokia <>2012-05-30 17:27:56 +0200
commit1533bfc5fcc4ec5865c1de606504b6aba8a5f6fe (patch)
tree01fcdf5c915e19be1fc79363fda08c8b6d6a2750 /config.tests/arch
parentd17cf14185eb84863549e0119c8b7bd20db78580 (diff)
Improve the architecture-detection mechanism
For the Unix part, this now obeys the -v option, printing the full command-line it used to compile, allowing testers to identify why something went wrong. Unfortunately, it requires a full compilation cycle, instead of just preprocessing. Just one more among the many on Unix, but maybe a noticeable slow-down on Windows. Change-Id: I654b70d99887e04c96731a5b91be9ad555e4d8fe Reviewed-by: Oswald Buddenhagen <> Reviewed-by: Girish Ramakrishnan <>
Diffstat (limited to 'config.tests/arch')
2 files changed, 29 insertions, 34 deletions
diff --git a/config.tests/arch/arch.cpp b/config.tests/arch/arch.cpp
index b1ec3d7111..ed772f70a0 100644
--- a/config.tests/arch/arch.cpp
+++ b/config.tests/arch/arch.cpp
@@ -1,6 +1,7 @@
** Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2012 Intel Corporation
** Contact:
** This file is part of the FOO module of the Qt Toolkit.
@@ -39,46 +40,43 @@
-// NOTE: This file is not meant to be compiled, only preprocessed.
#define QGLOBAL_H
#include "../../src/corelib/global/qprocessordetection.h"
-#undef alpha
-#undef arm
-#undef avr32
-#undef bfin
-#undef i386
-#undef x86_64
-#undef ia64
-#undef mips
-#undef power
-#undef s390
-#undef sh
-#undef sparc
-#undef unknown
+#include <stdio.h>
+extern const char msg[];
+const char msg[] = "==Qt=magic=Qt== Architecture:"
#if defined(Q_PROCESSOR_ALPHA)
-Architecture: alpha
#elif defined(Q_PROCESSOR_ARM)
-Architecture: arm
#elif defined(Q_PROCESSOR_AVR32)
-Architecture: avr32
-Architecture: bfin
#elif defined(Q_PROCESSOR_X86_32)
-Architecture: i386
#elif defined(Q_PROCESSOR_X86_64)
-Architecture: x86_64
#elif defined(Q_PROCESSOR_IA64)
-Architecture: ia64
#elif defined(Q_PROCESSOR_MIPS)
-Architecture: mips
#elif defined(Q_PROCESSOR_POWER)
-Architecture: power
#elif defined(Q_PROCESSOR_S390)
-Architecture: s390
#elif defined(Q_PROCESSOR_SH)
-Architecture: sh
#elif defined(Q_PROCESSOR_SPARC)
-Architecture: sparc
-Architecture: unknown
+ ;
+int main()
+ puts(msg);
diff --git a/config.tests/arch/ b/config.tests/arch/
index ea85a52b97..c6801264b4 100644
--- a/config.tests/arch/
+++ b/config.tests/arch/
@@ -1,7 +1,4 @@
-CONFIG -= qt debug_and_release
-# Detect target by preprocessing a file that uses Q_PROCESSOR_* macros from qprocessordetection.h
-# system function converts newline in output into spaces
-# Message back to configure so that it can set QT_ARCH and QT_HOST_ARCH
+SOURCES = arch.cpp
+CONFIG -= qt dylib release debug_and_release
+CONFIG += debug console
+mac:CONFIG -= app_bundle