summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlingnanyuan <1297162327@qq.com>2018-09-26 11:56:39 -0500
committerAdam J. Stewart <ajstewart426@gmail.com>2018-09-26 11:56:39 -0500
commitf88735c1eb601dc405b1c8aaa028b7bd0bccfe37 (patch)
treea214b52f38330fdea4b582938c718e28b4f5f298
parent28c0dd9148b5db3e06b38999e234167a872e7dfc (diff)
downloadspack-f88735c1eb601dc405b1c8aaa028b7bd0bccfe37.tar.gz
spack-f88735c1eb601dc405b1c8aaa028b7bd0bccfe37.tar.bz2
spack-f88735c1eb601dc405b1c8aaa028b7bd0bccfe37.tar.xz
spack-f88735c1eb601dc405b1c8aaa028b7bd0bccfe37.zip
gmap-gsnap: Add variant for different cpu support. (#8087)
* gmap-gsnap: Add variant for different cpu support. * gmap-gsnap: fix flake8 error. * gmap-gsnap: remove sys import. * Change variant type to multi-valued. * remove if-statement. * gmap-gsnap: Build in seperate directories. * gmap-gsnap: remove make distclean. * gmap-gsnap: rewrite the recipe.
-rw-r--r--var/spack/repos/builtin/packages/gmap-gsnap/package.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/gmap-gsnap/package.py b/var/spack/repos/builtin/packages/gmap-gsnap/package.py
index b653513f6a..36af8e1f4d 100644
--- a/var/spack/repos/builtin/packages/gmap-gsnap/package.py
+++ b/var/spack/repos/builtin/packages/gmap-gsnap/package.py
@@ -37,3 +37,33 @@ class GmapGsnap(AutotoolsPackage):
version('2018-02-12', '13152aedeef9ac66be915fc6bf6464f2')
version('2017-06-16', 'fcc91b8bdd4bf12ae3124de0c00db0c0')
version('2014-12-28', '1ab07819c9e5b5b8970716165ccaa7da')
+
+ variant(
+ 'simd',
+ description='CPU support.',
+ values=('avx2', 'sse42', 'avx512', 'sse2'),
+ multi=True
+ )
+
+ def configure(self, spec, prefix):
+ configure = Executable('../configure')
+
+ for simd in spec.variants['simd'].value:
+ with working_dir(simd, create=True):
+ configure('--with-simd-level={0}'.format(simd),
+ '--prefix={0}'.format(prefix))
+
+ def build(self, spec, prefix):
+ for simd in spec.variants['simd'].value:
+ with working_dir(simd):
+ make()
+
+ def check(self):
+ for simd in self.spec.variants['simd'].value:
+ with working_dir(simd):
+ make('check')
+
+ def install(self, spec, prefix):
+ for simd in spec.variants['simd'].value:
+ with working_dir(simd):
+ make('install')