summaryrefslogtreecommitdiffstats
path: root/src/corelib/global/qcompilerdetection.h
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2014-12-18 13:57:58 -0800
committerThiago Macieira <thiago.macieira@intel.com>2014-12-20 07:38:25 +0100
commit045fc1db757377771bba5c8f5c6429bbd02f441a (patch)
treebaddad43974a447efac33453f970df547662fb43 /src/corelib/global/qcompilerdetection.h
parent3092bd56c394f22e027be59368789546afb5ca98 (diff)
Unbreak the build with the Intel compiler on Windows
icl.exe behaves like cl.exe (MSVC), so we should use the MSVC-style of __pragma instead of _Pragma. Change-Id: Ieee740c430589c3bb1b964138f8bf7f58b8d2892 Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Diffstat (limited to 'src/corelib/global/qcompilerdetection.h')
-rw-r--r--src/corelib/global/qcompilerdetection.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/corelib/global/qcompilerdetection.h b/src/corelib/global/qcompilerdetection.h
index 89006eea7c..3a6f02db17 100644
--- a/src/corelib/global/qcompilerdetection.h
+++ b/src/corelib/global/qcompilerdetection.h
@@ -1070,7 +1070,17 @@
*/
#define QT_DO_PRAGMA(text) _Pragma(#text)
-#if defined(Q_CC_INTEL)
+#if defined(Q_CC_INTEL) && defined(Q_CC_MSVC)
+/* icl.exe: Intel compiler on Windows */
+# undef QT_DO_PRAGMA /* not needed */
+# define QT_WARNING_PUSH __pragma(warning(push))
+# define QT_WARNING_POP __pragma(warning(pop))
+# define QT_WARNING_DISABLE_MSVC(number)
+# define QT_WARNING_DISABLE_INTEL(number) __pragma(warning(disable: number))
+# define QT_WARNING_DISABLE_CLANG(text)
+# define QT_WARNING_DISABLE_GCC(text)
+#elif defined(Q_CC_INTEL)
+/* icc: Intel compiler on Linux or OS X */
# define QT_WARNING_PUSH QT_DO_PRAGMA(warning(push))
# define QT_WARNING_POP QT_DO_PRAGMA(warning(pop))
# define QT_WARNING_DISABLE_INTEL(number) QT_DO_PRAGMA(warning(disable: number))