summaryrefslogtreecommitdiff
path: root/Modules/CMakeFortranCompilerId.F.in
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CMakeFortranCompilerId.F.in')
-rw-r--r--Modules/CMakeFortranCompilerId.F.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in
index 956576d1be..5e8f646504 100644
--- a/Modules/CMakeFortranCompilerId.F.in
+++ b/Modules/CMakeFortranCompilerId.F.in
@@ -33,8 +33,16 @@
PRINT *, 'INFO:simulate_version[013.00]'
# endif
# endif
-#elif defined(__SUNPRO_F90) || defined(__SUNPRO_F95)
+#elif defined(__SUNPRO_F95)
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)
PRINT *, 'INFO:compiler[Cray]'
#elif defined(__G95__)