diff options
-rw-r--r-- | var/spack/repos/builtin/packages/libxsmm/package.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/libxsmm/package.py b/var/spack/repos/builtin/packages/libxsmm/package.py index 969557c329..abc5dc5cde 100644 --- a/var/spack/repos/builtin/packages/libxsmm/package.py +++ b/var/spack/repos/builtin/packages/libxsmm/package.py @@ -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 @@ class Libxsmm(Package): 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 @@ class Libxsmm(Package): 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'] |