summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Davydov <davydden@gmail.com>2016-05-03 12:13:31 +0200
committerDenis Davydov <davydden@gmail.com>2016-05-05 10:44:41 +0200
commit07fd0ccc9aeb1fb47ce6bbb1353a5c5fe7cf7e9a (patch)
tree61b4c13b5ff60c28c58d9f7b9a58d4c5e0e7822b
parent592045cd5453f3214737de04ce489126287f52dc (diff)
downloadspack-07fd0ccc9aeb1fb47ce6bbb1353a5c5fe7cf7e9a.tar.gz
spack-07fd0ccc9aeb1fb47ce6bbb1353a5c5fe7cf7e9a.tar.bz2
spack-07fd0ccc9aeb1fb47ce6bbb1353a5c5fe7cf7e9a.tar.xz
spack-07fd0ccc9aeb1fb47ce6bbb1353a5c5fe7cf7e9a.zip
compiler: add Clang.is_apple property which checks if Clang is from Apple or not using version
-rw-r--r--lib/spack/spack/compilers/clang.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/spack/spack/compilers/clang.py b/lib/spack/spack/compilers/clang.py
index 1f0eda3220..a6c9a69505 100644
--- a/lib/spack/spack/compilers/clang.py
+++ b/lib/spack/spack/compilers/clang.py
@@ -50,17 +50,23 @@ class Clang(Compiler):
'fc' : 'f90' }
@property
- def openmp_flag(self):
+ def is_apple(self):
ver_string = '%s' % self.version
if ver_string.endswith('-apple'):
+ return True
+ else:
+ return False
+
+ @property
+ def openmp_flag(self):
+ if self.is_apple:
tty.die("Clang from Apple does not support Openmp yet.")
else:
return "-fopenmp"
@property
def cxx11_flag(self):
- ver_string = '%s' % self.version
- if ver_string.endswith('-apple'):
+ if self.is_apple:
# FIXME: figure out from which version Apple's clang supports c++11
return "-std=c++11"
else: