summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeFortranCompilerId.F.in
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-02-17 18:29:33 (GMT)
committerBrad King <brad.king@kitware.com>2015-02-19 14:26:28 (GMT)
commit8c8b77a5dede8d1ad3110124b93973db8d879d79 (patch)
treefa06f30e8ae2e93291d25ad5cc1e6764e3c1a792 /Modules/CMakeFortranCompilerId.F.in
parent49562a77f7223befa21a5b72625dc10f807ce788 (diff)
downloadCMake-8c8b77a5dede8d1ad3110124b93973db8d879d79.zip
CMake-8c8b77a5dede8d1ad3110124b93973db8d879d79.tar.gz
CMake-8c8b77a5dede8d1ad3110124b93973db8d879d79.tar.bz2
Fortran: Detect GNU compiler version
Port logic from the "Compiler/GNU-DetermineCompiler" module into "CMakeFortranCompilerId.F.in".
Diffstat (limited to 'Modules/CMakeFortranCompilerId.F.in')
-rw-r--r--Modules/CMakeFortranCompilerId.F.in5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in
index fcffaa2..14ce395 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]'