summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-05-08 13:50:15 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-05-08 13:50:20 (GMT)
commit0361ca52f66fa3dbc369b7930c1d44f063d337e6 (patch)
treef751b6b4760bcb3237ae8142e118d8a6154e2de5
parentb05688db47e04de9a5c873ee531f02d31468a508 (diff)
parentd47190ba4694dbd64decf50bedc75a86cae9c65e (diff)
downloadCMake-0361ca52f66fa3dbc369b7930c1d44f063d337e6.zip
CMake-0361ca52f66fa3dbc369b7930c1d44f063d337e6.tar.gz
CMake-0361ca52f66fa3dbc369b7930c1d44f063d337e6.tar.bz2
Merge topic 'nag-fortran-version'
d47190ba NAG: Detect compiler version of NAG Fortran d52a4256 NAG: Extend compiler tool selection with NAG Fortran Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: Tom <tom.clune@nasa.gov> Merge-request: !809
-rw-r--r--Modules/CMakeDetermineFortranCompiler.cmake4
-rw-r--r--Modules/CMakeFortranCompilerId.F.in5
2 files changed, 8 insertions, 1 deletions
diff --git a/Modules/CMakeDetermineFortranCompiler.cmake b/Modules/CMakeDetermineFortranCompiler.cmake
index 9e9770a..d5220b4 100644
--- a/Modules/CMakeDetermineFortranCompiler.cmake
+++ b/Modules/CMakeDetermineFortranCompiler.cmake
@@ -60,6 +60,7 @@ else()
# fort: Compaq (now HP) Fortran 90/95 compiler for Tru64 and Linux/Alpha
# ifc: Intel Fortran 95 compiler for Linux/x86
# efc: Intel Fortran 95 compiler for IA64
+ # nagfor: NAG Fortran compiler
#
# The order is 95 or newer compilers first, then 90,
# then 77 or older compilers, gnu is always last in the group,
@@ -68,7 +69,7 @@ else()
ftn
ifort ifc af95 af90 efc f95 pathf2003 pathf95 pgf95 pgfortran lf95 xlf95
fort gfortran gfortran-4 g95 f90 pathf90 pgf90 xlf90 epcf90 fort77
- frt pgf77 xlf fl32 af77 g77 f77
+ frt pgf77 xlf fl32 af77 g77 f77 nag
)
# Vendor-specific compiler names.
@@ -79,6 +80,7 @@ else()
set(_Fortran_COMPILER_NAMES_PathScale pathf2003 pathf95 pathf90)
set(_Fortran_COMPILER_NAMES_XL xlf)
set(_Fortran_COMPILER_NAMES_VisualAge xlf95 xlf90 xlf)
+ set(_Fortran_COMPILER_NAMES_NAG nagfor)
endif()
_cmake_find_compiler(Fortran)
diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in
index 67cda3b..26b2ed6 100644
--- a/Modules/CMakeFortranCompilerId.F.in
+++ b/Modules/CMakeFortranCompilerId.F.in
@@ -103,6 +103,11 @@
PRINT *, 'INFO:compiler[MIPSpro]'
#elif defined(__hpux) || defined(__hpux__)
PRINT *, 'INFO:compiler[HP]'
+#elif defined(NAGFOR)
+ PRINT *, 'INFO:compiler[NAG]'
+#define COMPILER_VERSION_MAJOR DEC(__NAG_COMPILER_RELEASE/10)
+#define COMPILER_VERSION_MINOR DEC(__NAG_COMPILER_RELEASE % 10)
+#define COMPILER_VERSION_PATCH DEC(__NAG_COMPILER_BUILD)
#elif 1
# if 0
! The above 'elif 1' instead of 'else' is to work around a bug in the