summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorKyle Gerheiser <3209794+kgerheiser@users.noreply.github.com>2021-11-03 13:18:17 -0400
committerGitHub <noreply@github.com>2021-11-03 10:18:17 -0700
commit25f1aad1c8ccee7468b9841b3ccf87189fcece90 (patch)
tree56fc3a42e23f7a3d0eefad641b13d0abcf2430e8 /var
parent09eb79b57168cdf756ca6ca9bd4dfedf00122320 (diff)
downloadspack-25f1aad1c8ccee7468b9841b3ccf87189fcece90.tar.gz
spack-25f1aad1c8ccee7468b9841b3ccf87189fcece90.tar.bz2
spack-25f1aad1c8ccee7468b9841b3ccf87189fcece90.tar.xz
spack-25f1aad1c8ccee7468b9841b3ccf87189fcece90.zip
nemsio package: add version 2.5.4; add option to build without MPI (#27030)
Version 2.5.4 adds an option which allows Nemsio to be built without MPI
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/nemsio/package.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/var/spack/repos/builtin/packages/nemsio/package.py b/var/spack/repos/builtin/packages/nemsio/package.py
index ca86f37233..2b9a523718 100644
--- a/var/spack/repos/builtin/packages/nemsio/package.py
+++ b/var/spack/repos/builtin/packages/nemsio/package.py
@@ -18,11 +18,16 @@ class Nemsio(CMakePackage):
maintainers = ['t-brown', 'edwardhartnett', 'kgerheiser', 'Hang-Lei-NOAA']
+ variant('mpi', default=True, description='Build Nemsio with MPI')
+ # Nemsio 2.5.3 and below require MPI
+ conflicts('~mpi', when='@:2.5.3')
+
+ version('2.5.4', sha256='186a5f37d509d280c0237d4917db86ad676c5dd12d8a892df0333a10e751e481')
version('2.5.3', sha256='3fe8a781fc96197803d369cafe0138f3a5cbbca9816a7f8fd57567a1719a4d49')
version('2.5.2', sha256='c59e9379969690de8d030cbf4bbbbe3726faf13c304f3b88b0f6aec1496d2c08')
depends_on('bacio')
- depends_on('mpi')
+ depends_on('mpi', when='+mpi')
# nemsio 2.5.2 and earlier depend on w3nco.
depends_on('w3nco', when='@:2.5.2')
@@ -31,4 +36,11 @@ class Nemsio(CMakePackage):
depends_on('w3emc@2.9.0:', when='@2.5.3:')
def cmake_args(self):
- return ['-DMPI_Fortran_COMPILER=%s' % self.spec['mpi'].mpifc]
+ args = [
+ self.define_from_variant('ENABLE_MPI', 'mpi')
+ ]
+
+ if self.spec.satisfies('+mpi'):
+ args.append(self.define('CMAKE_Fortran_COMPILER', self.spec['mpi'].mpifc))
+
+ return args