summaryrefslogtreecommitdiff
path: root/lib/spack/spack/compilers/nag.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/spack/spack/compilers/nag.py')
-rw-r--r--lib/spack/spack/compilers/nag.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/lib/spack/spack/compilers/nag.py b/lib/spack/spack/compilers/nag.py
index 527a05a090..49b77eae6b 100644
--- a/lib/spack/spack/compilers/nag.py
+++ b/lib/spack/spack/compilers/nag.py
@@ -1,4 +1,5 @@
from spack.compiler import *
+import llnl.util.tty as tty
class Nag(Compiler):
# Subclasses use possible names of C compiler
@@ -20,6 +21,27 @@ class Nag(Compiler):
'f77' : 'nag/nagfor',
'fc' : 'nag/nagfor' }
+ @property
+ def openmp_flag(self):
+ return "-openmp"
+
+ @property
+ def cxx11_flag(self):
+ # NAG does not have a C++ compiler
+ # However, it can be mixed with a compiler that does support it
+ return "-std=c++11"
+
+ # Unlike other compilers, the NAG compiler passes options to GCC, which
+ # then passes them to the linker. Therefore, we need to doubly wrap the
+ # options with '-Wl,-Wl,,'
+ @property
+ def f77_rpath_arg(self):
+ return '-Wl,-Wl,,-rpath,'
+
+ @property
+ def fc_rpath_arg(self):
+ return '-Wl,-Wl,,-rpath,'
+
@classmethod
def default_version(self, comp):
"""The '-V' option works for nag compilers.