casacore: use a modern CMake's version of FindHDF5.cmake (#21882)
Remove casacore's old version of the file with a package patch() function, and depend on a modern CMake for the build. Co-authored-by: Massimiliano Culpo <massimiliano.culpo@gmail.com>
This commit is contained in:
parent
ad9db839cf
commit
4097a0c93f
@ -4,6 +4,7 @@
|
|||||||
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
||||||
|
|
||||||
from spack import *
|
from spack import *
|
||||||
|
import os
|
||||||
|
|
||||||
|
|
||||||
class Casacore(CMakePackage):
|
class Casacore(CMakePackage):
|
||||||
@ -22,6 +23,8 @@ class Casacore(CMakePackage):
|
|||||||
version('3.0.0', sha256='6f0e68fd77b5c96299f7583a03a53a90980ec347bff9dfb4c0abb0e2933e6bcb')
|
version('3.0.0', sha256='6f0e68fd77b5c96299f7583a03a53a90980ec347bff9dfb4c0abb0e2933e6bcb')
|
||||||
version('2.4.1', sha256='58eccc875053b2c6fe44fe53b6463030ef169597ec29926936f18d27b5087d63')
|
version('2.4.1', sha256='58eccc875053b2c6fe44fe53b6463030ef169597ec29926936f18d27b5087d63')
|
||||||
|
|
||||||
|
depends_on('cmake@3.7.1:', type='build')
|
||||||
|
|
||||||
variant('openmp', default=False, description='Build OpenMP support')
|
variant('openmp', default=False, description='Build OpenMP support')
|
||||||
variant('shared', default=True, description='Build shared libraries')
|
variant('shared', default=True, description='Build shared libraries')
|
||||||
variant('readline', default=True, description='Build readline support')
|
variant('readline', default=True, description='Build readline support')
|
||||||
@ -73,3 +76,7 @@ def cmake_args(self):
|
|||||||
|
|
||||||
args.append('-DBUILD_TESTING=OFF')
|
args.append('-DBUILD_TESTING=OFF')
|
||||||
return args
|
return args
|
||||||
|
|
||||||
|
def patch(self):
|
||||||
|
# Rely on CMake ability to find hdf5, available since CMake 3.7.X
|
||||||
|
os.remove('cmake/FindHDF5.cmake')
|
||||||
|
Loading…
Reference in New Issue
Block a user