Detect Intel compiler version with its id (#11937)

Decode decimal digits from

  __INTEL_COMPILER
  __INTEL_COMPILER_BUILD_DATE

to compute the version number components.  See documentation at:

  http://predef.sourceforge.net/precomp.html
  http://software.intel.com/sites/products/documentation/hpc/compilerpro/en-us/fortran/lin/compiler_f/bldaps_for/common/bldaps_use_presym.htm
This commit is contained in:
Brad King 2011-12-06 11:54:58 -05:00
parent a6d83ccea9
commit 2cc205a0fb
2 changed files with 12 additions and 0 deletions

View File

@ -8,6 +8,12 @@
#if defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
# if defined(__INTEL_COMPILER_BUILD_DATE)
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
# endif
#elif defined(__clang__)
# define COMPILER_ID "Clang"

View File

@ -10,6 +10,12 @@
#elif defined(__INTEL_COMPILER) || defined(__ICC)
# define COMPILER_ID "Intel"
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
# if defined(__INTEL_COMPILER_BUILD_DATE)
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
# endif
#elif defined(__clang__)
# define COMPILER_ID "Clang"