From 302d47b1fe19fb794800faa548d4cb9a8e89220a Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 17 Feb 2015 13:30:19 -0500 Subject: [PATCH] Fortran: Detect XL and VisualAge compiler versions Port logic from the "Compiler/XL-*-DetermineCompiler" and "Compiler/VisualAge-*-DetermineCompiler" modules into "CMakeFortranCompilerId.F.in". --- Modules/CMakeFortranCompilerId.F.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in index 14ce39582..4c172a8be 100644 --- a/Modules/CMakeFortranCompilerId.F.in +++ b/Modules/CMakeFortranCompilerId.F.in @@ -68,8 +68,14 @@ PRINT *, 'INFO:compiler[zOS]' # elif __IBMC__ >= 800 PRINT *, 'INFO:compiler[XL]' +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) # else PRINT *, 'INFO:compiler[VisualAge]' +# define COMPILER_VERSION_MAJOR DEC(__IBMC__/100) +# define COMPILER_VERSION_MINOR DEC(__IBMC__/10 % 10) +# define COMPILER_VERSION_PATCH DEC(__IBMC__ % 10) # endif #elif defined(__PGI) PRINT *, 'INFO:compiler[PGI]'