Fortran: Detect SunPro compiler version

Port logic from "Compiler/SunPro-*DetermineCompiler" modules into
"CMakeFortranCompilerId.F.in".
This commit is contained in:
Brad King 2015-02-17 13:27:22 -05:00
parent 2e09c4230f
commit aa77b631d9
1 changed files with 9 additions and 1 deletions

View File

@ -33,8 +33,16 @@
PRINT *, 'INFO:simulate_version[013.00]' PRINT *, 'INFO:simulate_version[013.00]'
# endif # endif
# endif # endif
#elif defined(__SUNPRO_F90) || defined(__SUNPRO_F95) #elif defined(__SUNPRO_F95)
PRINT *, 'INFO:compiler[SunPro]' PRINT *, 'INFO:compiler[SunPro]'
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_F95>>8)
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_F95>>4 & 0xF)
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_F95 & 0xF)
#elif defined(__SUNPRO_F90)
PRINT *, 'INFO:compiler[SunPro]'
# define COMPILER_VERSION_MAJOR HEX(__SUNPRO_F90>>8)
# define COMPILER_VERSION_MINOR HEX(__SUNPRO_F90>>4 & 0xF)
# define COMPILER_VERSION_PATCH HEX(__SUNPRO_F90 & 0xF)
#elif defined(_CRAYFTN) #elif defined(_CRAYFTN)
PRINT *, 'INFO:compiler[Cray]' PRINT *, 'INFO:compiler[Cray]'
#elif defined(__G95__) #elif defined(__G95__)