From 8c8b77a5dede8d1ad3110124b93973db8d879d79 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 17 Feb 2015 13:29:33 -0500 Subject: [PATCH] Fortran: Detect GNU compiler version Port logic from the "Compiler/GNU-DetermineCompiler" module into "CMakeFortranCompilerId.F.in". --- Modules/CMakeFortranCompilerId.F.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in index fcffaa260..14ce39582 100644 --- a/Modules/CMakeFortranCompilerId.F.in +++ b/Modules/CMakeFortranCompilerId.F.in @@ -58,6 +58,11 @@ PRINT *, 'INFO:compiler[Absoft]' #elif defined(__GNUC__) PRINT *, 'INFO:compiler[GNU]' +# define COMPILER_VERSION_MAJOR DEC(__GNUC__) +# define COMPILER_VERSION_MINOR DEC(__GNUC_MINOR__) +# if defined(__GNUC_PATCHLEVEL__) +# define COMPILER_VERSION_PATCH DEC(__GNUC_PATCHLEVEL__) +# endif #elif defined(__IBMC__) # if defined(__COMPILER_VER__) PRINT *, 'INFO:compiler[zOS]'