Massive conversion from Package to CMakePackage (#4975)
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
from spack import *
|
||||
|
||||
|
||||
class CBlosc(Package):
|
||||
class CBlosc(CMakePackage):
|
||||
"""Blosc, an extremely fast, multi-threaded, meta-compressor library"""
|
||||
homepage = "http://www.blosc.org"
|
||||
url = "https://github.com/Blosc/c-blosc/archive/v1.11.1.tar.gz"
|
||||
@@ -42,15 +42,21 @@ class CBlosc(Package):
|
||||
|
||||
variant('avx2', default=True, description='Enable AVX2 support')
|
||||
|
||||
depends_on("cmake", type='build')
|
||||
depends_on("snappy")
|
||||
depends_on("zlib")
|
||||
depends_on('cmake@2.8.10:', type='build')
|
||||
depends_on('snappy')
|
||||
depends_on('zlib')
|
||||
|
||||
def install(self, spec, prefix):
|
||||
avx2 = '-DDEACTIVATE_AVX2=%s' % ('ON' if '~avx2' in spec else 'OFF')
|
||||
cmake('.', avx2, *std_cmake_args)
|
||||
def cmake_args(self):
|
||||
args = []
|
||||
|
||||
make()
|
||||
make("install")
|
||||
if '+avx2' in self.spec:
|
||||
args.append('-DDEACTIVATE_AVX2=OFF')
|
||||
else:
|
||||
args.append('-DDEACTIVATE_AVX2=ON')
|
||||
|
||||
return args
|
||||
|
||||
@run_after('install')
|
||||
def darwin_fix(self):
|
||||
if sys.platform == 'darwin':
|
||||
fix_darwin_install_name(prefix.lib)
|
||||
fix_darwin_install_name(self.prefix.lib)
|
||||
|
Reference in New Issue
Block a user