libxsmm: Add header-only variant (#3419)
* libxsmm: Add header-only variant * libxsmm: Implement requestes from code review * libxsmm: Correct error in previous simplification * libxsmm: Raise error if `header-only` variant is not supported by version * libxsmm: Correct flake8 errors
This commit is contained in:
parent
18ac76b320
commit
41a3957540
@ -56,6 +56,8 @@ class Libxsmm(Package):
|
||||
|
||||
variant('debug', default=False,
|
||||
description='Unoptimized with call-trace (LIBXSMM_TRACE).')
|
||||
variant('header-only', default=False,
|
||||
description='Produce header-only installation')
|
||||
|
||||
def patch(self):
|
||||
kwargs = {'ignore_absent': False, 'backup': False, 'string': True}
|
||||
@ -71,8 +73,10 @@ def patch(self):
|
||||
makefile.filter('FC = gfortran', 'FC ?= gfortran', **kwargs)
|
||||
|
||||
def manual_install(self, prefix):
|
||||
spec = self.spec
|
||||
install_tree('include', prefix.include)
|
||||
install_tree('lib', prefix.lib)
|
||||
if '~header-only' in spec:
|
||||
install_tree('lib', prefix.lib)
|
||||
doc_path = prefix.share + '/libxsmm/doc'
|
||||
mkdirp(doc_path)
|
||||
for doc_file in glob('documentation/*.md'):
|
||||
@ -83,9 +87,17 @@ def manual_install(self, prefix):
|
||||
install('LICENSE', doc_path)
|
||||
|
||||
def install(self, spec, prefix):
|
||||
if '+header-only' in spec and '@1.6.2:' not in spec:
|
||||
raise InstallError(
|
||||
"The variant +header-only is only available " +
|
||||
"for versions @1.6.2:")
|
||||
|
||||
# include symbols by default
|
||||
make_args = ['SYM=1']
|
||||
|
||||
if '+header-only' in spec:
|
||||
make_args += ['header-only']
|
||||
|
||||
# JIT (AVX and later) makes MNK, M, N, or K spec. superfluous
|
||||
# make_args += ['MNK=1 4 5 6 8 9 13 16 17 22 23 24 26 32']
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user