summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/kernel
diff options
context:
space:
mode:
authorRohan McGovern <rohan.mcgovern@nokia.com>2012-05-23 12:53:57 +1000
committerQt by Nokia <qt-info@nokia.com>2012-05-24 07:14:40 +0200
commit0a298ab4855703675767a4d51c63dce4546a50b6 (patch)
treebbccc699261bf61e942ffa30b0112bb37a27b59c /tests/auto/corelib/kernel
parent0a290318fbd0e34a9d97922c75f350c326c24930 (diff)
tst_qmetatype: avoid slow compilation with some MSVC2010
MSVC2010 32-bit (with and without service pack 1) takes about 1 hour to compile this file in some builds, since 1c7421ad14f9321422cdfeede3902552a34ccf3b. Avoid the relevant portion of the code just for these compilers. Change-Id: Icbb4fa12a6d563a7cdc882c30cdb5705675bedb0 Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Diffstat (limited to 'tests/auto/corelib/kernel')
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
index c3e2bd299d..d82f7560e3 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -47,6 +47,12 @@
# include <pthread.h>
#endif
+// At least these specific versions of MSVC2010 has a severe performance problem with this file,
+// taking about 1 hour to compile if the portion making use of variadic macros is enabled.
+#if defined(_MSC_FULL_VER) && (_MSC_FULL_VER >= 160030319) && (_MSC_FULL_VER <= 160040219)
+# define TST_QMETATYPE_BROKEN_COMPILER
+#endif
+
Q_DECLARE_METATYPE(QMetaType::Type)
class tst_QMetaType: public QObject
@@ -1332,7 +1338,7 @@ void tst_QMetaType::automaticTemplateRegistration()
QVERIFY(qRegisterMetaType<UnregisteredTypeList>("UnregisteredTypeList") > 0);
}
-#ifdef Q_COMPILER_VARIADIC_MACROS
+#if defined(Q_COMPILER_VARIADIC_MACROS) && !defined(TST_QMETATYPE_BROKEN_COMPILER)
#define FOR_EACH_STATIC_PRIMITIVE_TYPE(F, ...) \
F(bool, __VA_ARGS__) \