summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/compilers/clang.py8
-rw-r--r--lib/spack/spack/compilers/gcc.py4
-rw-r--r--lib/spack/spack/compilers/intel.py6
-rw-r--r--lib/spack/spack/compilers/nag.py4
-rw-r--r--lib/spack/spack/compilers/pgi.py4
-rw-r--r--lib/spack/spack/compilers/xl.py4
6 files changed, 28 insertions, 2 deletions
diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py
index 8a60ebcaed..44de77af4f 100644
--- a/lib/spack/spack/compilers/clang.py
+++ b/lib/spack/spack/compilers/clang.py
@@ -48,6 +48,14 @@ class Clang(Compiler):
'fc' : 'f90' }
@property
+ def openmp_flag(self):
+ ver = '%s' % self.version
+ if ver.endswith('-apple'):
+ tty.die("Clang from Apple does not support Openmp yet.")
+ else:
+ return "-fopenmp"
+
+ @property
def cxx11_flag(self):
if ver.endswith('-apple'):
# FIXME: figure out from which version Apple's clang supports c++11
diff --git a/lib/spack/spack/compilers/gcc.py b/lib/spack/spack/compilers/gcc.py
index 2e57e44856..91c498ac82 100644
--- a/lib/spack/spack/compilers/gcc.py
+++ b/lib/spack/spack/compilers/gcc.py
@@ -50,6 +50,10 @@ class Gcc(Compiler):
'fc' : 'gcc/gfortran' }
@property
+ def openmp_flag(self):
+ return "-fopenmp"
+
+ @property
def cxx11_flag(self):
if self.version < ver('4.3'):
tty.die("Only gcc 4.3 and above support c++11.")
diff --git a/lib/spack/spack/compilers/intel.py b/lib/spack/spack/compilers/intel.py
index 69e9764790..f04a6aa899 100644
--- a/lib/spack/spack/compilers/intel.py
+++ b/lib/spack/spack/compilers/intel.py
@@ -44,6 +44,10 @@ class Intel(Compiler):
'fc' : 'intel/ifort' }
@property
+ def openmp_flag(self):
+ return "-openmp"
+
+ @property
def cxx11_flag(self):
if self.version < ver('11.1'):
tty.die("Only intel 11.1 and above support c++11.")
@@ -68,5 +72,3 @@ class Intel(Compiler):
"""
return get_compiler_version(
comp, '--version', r'\((?:IFORT|ICC)\) ([^ ]+)')
-
-
diff --git a/lib/spack/spack/compilers/nag.py b/lib/spack/spack/compilers/nag.py
index 1df6b1c591..61486f22bd 100644
--- a/lib/spack/spack/compilers/nag.py
+++ b/lib/spack/spack/compilers/nag.py
@@ -21,6 +21,10 @@ class Nag(Compiler):
'fc' : 'nag/nagfor' }
@property
+ def openmp_flag(self):
+ return "-openmp"
+
+ @property
def cxx11_flag(self):
tty.die("cxx11_flag() is not implemented for nag. Consider creating a pull-request.")
return "-std=c++11"
diff --git a/lib/spack/spack/compilers/pgi.py b/lib/spack/spack/compilers/pgi.py
index ebf644404b..299b9a7016 100644
--- a/lib/spack/spack/compilers/pgi.py
+++ b/lib/spack/spack/compilers/pgi.py
@@ -44,6 +44,10 @@ class Pgi(Compiler):
'fc' : 'pgi/pgfortran' }
@property
+ def openmp_flag(self):
+ return "-mp"
+
+ @property
def cxx11_flag(self):
tty.die("cxx11_flag() is not implemented for pgi. Consider creating a pull-request.")
return "-std=c++11"
diff --git a/lib/spack/spack/compilers/xl.py b/lib/spack/spack/compilers/xl.py
index c1d55109a3..657309fe06 100644
--- a/lib/spack/spack/compilers/xl.py
+++ b/lib/spack/spack/compilers/xl.py
@@ -45,6 +45,10 @@ class Xl(Compiler):
'fc' : 'xl/xlf90' }
@property
+ def openmp_flag(self):
+ return "-qsmp=omp"
+
+ @property
def cxx11_flag(self):
if self.version < ver('13.1'):
tty.die("Only xlC 13.1 and above have some c++11 support.")