Add cpu_target variant to openblas (#5090)
This commit is contained in:
parent
f39fa2fee9
commit
bce26745e3
1 changed files with 9 additions and 1 deletions
|
@ -51,6 +51,10 @@ class Openblas(MakefilePackage):
|
||||||
variant('openmp', default=False, description="Enable OpenMP support.")
|
variant('openmp', default=False, description="Enable OpenMP support.")
|
||||||
variant('pic', default=True, description='Build position independent code')
|
variant('pic', default=True, description='Build position independent code')
|
||||||
|
|
||||||
|
variant('cpu_target', default='',
|
||||||
|
description='Set CPU target architecture (leave empty for '
|
||||||
|
'autodetection; GENERIC, SSE_GENERIC, NEHALEM, ...)')
|
||||||
|
|
||||||
# virtual dependency
|
# virtual dependency
|
||||||
provides('blas')
|
provides('blas')
|
||||||
provides('lapack')
|
provides('lapack')
|
||||||
|
@ -108,8 +112,12 @@ def make_defs(self):
|
||||||
'FC={0}'.format(spack_f77),
|
'FC={0}'.format(spack_f77),
|
||||||
'MAKE_NO_J=1'
|
'MAKE_NO_J=1'
|
||||||
]
|
]
|
||||||
|
if self.spec.variants['cpu_target'].value:
|
||||||
|
make_defs += [
|
||||||
|
'TARGET={0}'.format(self.spec.variants['cpu_target'].value)
|
||||||
|
]
|
||||||
# invoke make with the correct TARGET for aarch64
|
# invoke make with the correct TARGET for aarch64
|
||||||
if 'aarch64' in spack.architecture.sys_type():
|
elif 'aarch64' in spack.architecture.sys_type():
|
||||||
make_defs += [
|
make_defs += [
|
||||||
'TARGET=PILEDRIVER',
|
'TARGET=PILEDRIVER',
|
||||||
'TARGET=ARMV8'
|
'TARGET=ARMV8'
|
||||||
|
|
Loading…
Reference in a new issue