Fortran: Detect GNU compiler version

Port logic from the "Compiler/GNU-DetermineCompiler" module into
"CMakeFortranCompilerId.F.in".
This commit is contained in:
Brad King 2015-02-17 13:29:33 -05:00
parent 49562a77f7
commit 8c8b77a5de
1 changed files with 5 additions and 0 deletions

View File

@ -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]'