summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2017-03-11 17:00:47 -0500
committerAdam J. Stewart <ajstewart426@gmail.com>2017-03-11 16:00:47 -0600
commit41a395754027d394b8b75b0b02f52d6aeb8f88fa (patch)
treeb77a43babc05172f08aed51014ffab9f13f0ed23 /var
parent18ac76b32094d0b99809feae182609dc198cc69d (diff)
downloadspack-41a395754027d394b8b75b0b02f52d6aeb8f88fa.tar.gz
spack-41a395754027d394b8b75b0b02f52d6aeb8f88fa.tar.bz2
spack-41a395754027d394b8b75b0b02f52d6aeb8f88fa.tar.xz
spack-41a395754027d394b8b75b0b02f52d6aeb8f88fa.zip
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
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/libxsmm/package.py14
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']