From 2e09c4230f601ef5d744a2e43643e214a149ba39 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 17 Feb 2015 13:26:14 -0500 Subject: [PATCH] Fortran: Detect Intel compiler version Port logic from the "Compiler/Intel-DetermineCompiler" module into "CMakeFortranCompilerId.F.in". --- Modules/CMakeFortranCompilerId.F.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in index 955ca8508..956576d1b 100644 --- a/Modules/CMakeFortranCompilerId.F.in +++ b/Modules/CMakeFortranCompilerId.F.in @@ -4,6 +4,17 @@ #endif #if defined(__INTEL_COMPILER) || defined(__ICC) 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) PRINT *, 'INFO:simulate[MSVC]' # if _MSC_VER >= 1800