diff options
author | Denis Davydov <davydden@gmail.com> | 2016-05-03 12:13:31 +0200 |
---|---|---|
committer | Denis Davydov <davydden@gmail.com> | 2016-05-05 10:44:41 +0200 |
commit | 07fd0ccc9aeb1fb47ce6bbb1353a5c5fe7cf7e9a (patch) | |
tree | 61b4c13b5ff60c28c58d9f7b9a58d4c5e0e7822b | |
parent | 592045cd5453f3214737de04ce489126287f52dc (diff) | |
download | spack-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.py | 12 |
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: |