compiler: add Clang.is_apple property which checks if Clang is from Apple or not using version
This commit is contained in:
parent
592045cd54
commit
07fd0ccc9a
@ -50,17 +50,23 @@ class Clang(Compiler):
|
|||||||
'fc' : 'f90' }
|
'fc' : 'f90' }
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def openmp_flag(self):
|
def is_apple(self):
|
||||||
ver_string = '%s' % self.version
|
ver_string = '%s' % self.version
|
||||||
if ver_string.endswith('-apple'):
|
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.")
|
tty.die("Clang from Apple does not support Openmp yet.")
|
||||||
else:
|
else:
|
||||||
return "-fopenmp"
|
return "-fopenmp"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def cxx11_flag(self):
|
def cxx11_flag(self):
|
||||||
ver_string = '%s' % self.version
|
if self.is_apple:
|
||||||
if ver_string.endswith('-apple'):
|
|
||||||
# FIXME: figure out from which version Apple's clang supports c++11
|
# FIXME: figure out from which version Apple's clang supports c++11
|
||||||
return "-std=c++11"
|
return "-std=c++11"
|
||||||
else:
|
else:
|
||||||
|
Loading…
Reference in New Issue
Block a user