Fix ICC build on Windows: __VERSION__ isn't defined
So let's define the version ourselves. This is done for all OS because __VERSION__ doesn't include the actual compiler version... Change-Id: Ida706a8f4bfe75af04ce8f11ea2124c1659c19ce Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
eab7ec586d
commit
a59bbcc952
|
|
@ -258,7 +258,35 @@ QLibraryInfo::buildDate()
|
|||
#endif //QT_NO_DATESTRING
|
||||
|
||||
#if defined(Q_CC_INTEL) // must be before GNU, Clang and MSVC because ICC/ICL claim to be them
|
||||
# define COMPILER_STRING __VERSION__ /* __VERSION__ starts with "Intel(R) C++" */
|
||||
# ifdef __INTEL_CLANG_COMPILER
|
||||
# define ICC_COMPAT "Clang"
|
||||
# elif defined(__INTEL_MS_COMPAT_LEVEL)
|
||||
# define ICC_COMPAT "Microsoft"
|
||||
# elif defined(__GNUC__)
|
||||
# define ICC_COMPAT "GCC"
|
||||
# else
|
||||
# define ICC_COMPAT "no"
|
||||
# endif
|
||||
# if __INTEL_COMPILER == 1300
|
||||
# define ICC_VERSION "13.0"
|
||||
# elif __INTEL_COMPILER == 1310
|
||||
# define ICC_VERSION "13.1"
|
||||
# elif __INTEL_COMPILER == 1400
|
||||
# define ICC_VERSION "14.0"
|
||||
# elif __INTEL_COMPILER == 1500
|
||||
# define ICC_VERSION "15.0"
|
||||
# else
|
||||
# define ICC_VERSION QT_STRINGIFY(__INTEL_COMPILER)
|
||||
# endif
|
||||
# ifdef __INTEL_COMPILER_UPDATE
|
||||
# define COMPILER_STRING "Intel(R) C++ " ICC_VERSION "." QT_STRINGIFY(__INTEL_COMPILER_UPDATE) \
|
||||
" build " QT_STRINGIFY(__INTEL_COMPILER_BUILD_DATE) " [" \
|
||||
ICC_COMPAT " compatibility]"
|
||||
# else
|
||||
# define COMPILER_STRING "Intel(R) C++ " ICC_VERSION \
|
||||
" build " QT_STRINGIFY(__INTEL_COMPILER_BUILD_DATE) " [" \
|
||||
ICC_COMPAT " compatibility]"
|
||||
# endif
|
||||
#elif defined(Q_CC_CLANG) // must be before GNU, because clang claims to be GNU too
|
||||
# ifdef __apple_build_version__ // Apple clang has other version numbers
|
||||
# define COMPILER_STRING "Clang " __clang_version__ " (Apple)"
|
||||
|
|
|
|||
Loading…
Reference in New Issue