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>
# 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
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__) \