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:
Martin Pokorny 2021-03-05 09:05:37 -07:00 committed by GitHub
parent ad9db839cf
commit 4097a0c93f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,6 +4,7 @@
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
import os
class Casacore(CMakePackage):
@ -22,6 +23,8 @@ class Casacore(CMakePackage):
version('3.0.0', sha256='6f0e68fd77b5c96299f7583a03a53a90980ec347bff9dfb4c0abb0e2933e6bcb')
version('2.4.1', sha256='58eccc875053b2c6fe44fe53b6463030ef169597ec29926936f18d27b5087d63')
depends_on('cmake@3.7.1:', type='build')
variant('openmp', default=False, description='Build OpenMP support')
variant('shared', default=True, description='Build shared libraries')
variant('readline', default=True, description='Build readline support')
@ -73,3 +76,7 @@ def cmake_args(self):
args.append('-DBUILD_TESTING=OFF')
return args
def patch(self):
# Rely on CMake ability to find hdf5, available since CMake 3.7.X
os.remove('cmake/FindHDF5.cmake')