summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Schnetter <schnetter@gmail.com>2017-01-25 23:39:10 -0500
committerTodd Gamblin <tgamblin@llnl.gov>2017-01-25 21:39:10 -0700
commit1ddd9c75c6326cb5733769a168d62e410d02fe46 (patch)
treecf0388b1a50df4f34f6bbec2686f1f882f535230
parent11454280e72badd5ca07f90cd87733e54566f2ab (diff)
downloadspack-1ddd9c75c6326cb5733769a168d62e410d02fe46.tar.gz
spack-1ddd9c75c6326cb5733769a168d62e410d02fe46.tar.bz2
spack-1ddd9c75c6326cb5733769a168d62e410d02fe46.tar.xz
spack-1ddd9c75c6326cb5733769a168d62e410d02fe46.zip
c-blosc: Add variant to disable AVX2 support (#2931)
Not all compilers support AVX2 instructions, and the package’s test for this is much too simplistic.
-rw-r--r--var/spack/repos/builtin/packages/c-blosc/package.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/c-blosc/package.py b/var/spack/repos/builtin/packages/c-blosc/package.py
index e7695c67c7..8bb0e295af 100644
--- a/var/spack/repos/builtin/packages/c-blosc/package.py
+++ b/var/spack/repos/builtin/packages/c-blosc/package.py
@@ -40,12 +40,15 @@ class CBlosc(Package):
version('1.8.1', 'd73d5be01359cf271e9386c90dcf5b05')
version('1.8.0', '5b92ecb287695ba20cc33d30bf221c4f')
+ variant('avx2', default=True, description='Enable AVX2 support')
+
depends_on("cmake", type='build')
depends_on("snappy")
depends_on("zlib")
def install(self, spec, prefix):
- cmake('.', *std_cmake_args)
+ avx2 = '-DDEACTIVATE_AVX2=%s' % ('ON' if '~avx2' in spec else 'OFF')
+ cmake('.', avx2, *std_cmake_args)
make()
make("install")