path: root/config.tests/arch
diff options
authorThiago Macieira <>2014-03-06 12:58:21 -0800
committerThe Qt Project <>2014-05-09 19:39:44 +0200
commit1ec8df439a1b3d82c6f4d443c22fc9bb00566d1e (patch)
tree155d6d4e02ade75bbaa1ffaf1914c9d6dbde126e /config.tests/arch
parent0b5c0ad2ef49a262de5bdb18a3cdab30ae6772a2 (diff)
Add QSysInfo::cpuArchitecture() and fullCpuArchitecture()
This uses the same logic as the config.test, so we will return the same string as the $$QT_ARCH variable in qmake for cpuArchitecture(). fullCpuArchitecture() is meant to be used in upgrade mechanisms, when combined with the OS type. Change-Id: If0dfee9eff75a07fa4c0778d204e0e768bf43074 Reviewed-by: Kai Koehne <> Reviewed-by: Oswald Buddenhagen <>
Diffstat (limited to 'config.tests/arch')
1 files changed, 5 insertions, 30 deletions
diff --git a/config.tests/arch/arch.cpp b/config.tests/arch/arch.cpp
index b3c0d3b7d2..4e19ca6fb2 100644
--- a/config.tests/arch/arch.cpp
+++ b/config.tests/arch/arch.cpp
@@ -41,40 +41,14 @@
#define QGLOBAL_H
-#include "../../src/corelib/global/qprocessordetection.h"
+#include "../../src/corelib/global/archdetect.cpp"
#include <stdio.h>
extern const char msg[];
-const char msg[] = "==Qt=magic=Qt== Architecture:"
+const char msg[] = "==Qt=magic=Qt== Architecture:" ARCH_PROCESSOR;
-#if defined(Q_PROCESSOR_ALPHA)
-#elif defined(Q_PROCESSOR_ARM)
-#elif defined(Q_PROCESSOR_AVR32)
-#elif defined(Q_PROCESSOR_BLACKFIN)
-#elif defined(Q_PROCESSOR_X86_32)
-#elif defined(Q_PROCESSOR_X86_64)
-#elif defined(Q_PROCESSOR_IA64)
-#elif defined(Q_PROCESSOR_MIPS)
-#elif defined(Q_PROCESSOR_POWER)
-#elif defined(Q_PROCESSOR_S390)
-#elif defined(Q_PROCESSOR_SH)
-#elif defined(Q_PROCESSOR_SPARC)
- ;
+extern const char msgfull[];
+const char msgfull[] = "==Qt=magic=Qt== Full Architecture:" ARCH_FULL;
extern const char msg2[];
const char msg2[] = "==Qt=magic=Qt== Sub-architecture:"
@@ -265,5 +239,6 @@ const char msg2[] = "==Qt=magic=Qt== Sub-architecture:"
int main()
+ puts(msgfull);