diff options
author | Martin Pokorny <martin@truffulatree.org> | 2021-03-20 07:58:56 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-20 14:58:56 +0100 |
commit | c84c0187eafef812fb1316c4da9bcf1096d26a02 (patch) | |
tree | 4e6dba2e2a892c7eaadf6fd3489acc075218e22d /var | |
parent | ec0dc67e73cf4b998b40629c5531055cba0c14e9 (diff) | |
download | spack-c84c0187eafef812fb1316c4da9bcf1096d26a02.tar.gz spack-c84c0187eafef812fb1316c4da9bcf1096d26a02.tar.bz2 spack-c84c0187eafef812fb1316c4da9bcf1096d26a02.tar.xz spack-c84c0187eafef812fb1316c4da9bcf1096d26a02.zip |
casacore: fft implementation default (#22226)
* Change default FFT implementation to FFTW
To account for the default changing with casacore v3.4.0, as well as the
CMake logic for getting the FFTPack implementation.
* Switch to using spec.satisfies() for Python CMake values
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/casacore/package.py | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/casacore/package.py b/var/spack/repos/builtin/packages/casacore/package.py index 65f7e056d9..b11a0dc606 100644 --- a/var/spack/repos/builtin/packages/casacore/package.py +++ b/var/spack/repos/builtin/packages/casacore/package.py @@ -31,7 +31,7 @@ class Casacore(CMakePackage): variant('readline', default=True, description='Build readline support') # see note below about the reason for disabling the "sofa" variant # variant('sofa', default=False, description='Build SOFA support') - variant('fftw', default=False, description='Build FFTW3 support') + variant('fftw', default=True, description='Build FFTW3 support') variant('hdf5', default=False, description='Build HDF5 support') variant('python', default=False, description='Build python support') @@ -65,12 +65,20 @@ class Casacore(CMakePackage): args.append(self.define_from_variant('USE_OPENMP', 'openmp')) args.append(self.define_from_variant('USE_READLINE', 'readline')) args.append(self.define_from_variant('USE_HDF5', 'hdf5')) - args.append(self.define_from_variant('USE_FFTW3', 'fftw')) + + # fftw3 is used by casacore as the default starting with + # v3.4.0 (although we use fftw3 by default in this Spack + # package), but the old fftpack is still available + if spec.satisfies('@3.4.0:'): + if spec.satisfies('~fftw'): + args.append('-DBUILD_FFTPACK_DEPRECATED=YES') + else: + args.append(self.define_from_variant('USE_FFTW3', 'fftw')) # Python2 and Python3 binding - if '+python' not in spec: + if spec.satisfies('~python'): args.extend(['-DBUILD_PYTHON=NO', '-DBUILD_PYTHON3=NO']) - elif spec['python'].version >= Version('3.0.0'): + elif spec.satisfies('^python@3.0.0:'): args.extend(['-DBUILD_PYTHON=NO', '-DBUILD_PYTHON3=YES']) else: args.extend(['-DBUILD_PYTHON=YES', '-DBUILD_PYTHON3=NO']) |