Fortran: Detect Intel compiler version

Port logic from the "Compiler/Intel-DetermineCompiler" module into
"CMakeFortranCompilerId.F.in".
This commit is contained in:
Brad King 2015-02-17 13:26:14 -05:00
parent e6ebc814df
commit 2e09c4230f
1 changed files with 11 additions and 0 deletions

View File

@ -4,6 +4,17 @@
#endif #endif
#if defined(__INTEL_COMPILER) || defined(__ICC) #if defined(__INTEL_COMPILER) || defined(__ICC)
PRINT *, 'INFO:compiler[Intel]' PRINT *, 'INFO:compiler[Intel]'
# define COMPILER_VERSION_MAJOR DEC(__INTEL_COMPILER/100)
# define COMPILER_VERSION_MINOR DEC(__INTEL_COMPILER/10 % 10)
# if defined(__INTEL_COMPILER_UPDATE)
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER_UPDATE)
# else
# define COMPILER_VERSION_PATCH DEC(__INTEL_COMPILER % 10)
# endif
# if defined(__INTEL_COMPILER_BUILD_DATE)
# define COMPILER_VERSION_TWEAK DEC(__INTEL_COMPILER_BUILD_DATE)
# endif
# if defined(_MSC_VER) # if defined(_MSC_VER)
PRINT *, 'INFO:simulate[MSVC]' PRINT *, 'INFO:simulate[MSVC]'
# if _MSC_VER >= 1800 # if _MSC_VER >= 1800