summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authormic84 <mrosso@lbl.gov>2020-11-03 10:33:45 -0800
committerGitHub <noreply@github.com>2020-11-03 12:33:45 -0600
commit001f90f411c0f13beb978c27b9ff2546a31777e0 (patch)
treea7f474e9b4266c02a2ef3e98c98a931747139cc0 /var
parent2c511a7dd05a5c5c9efad8bb166f11bcbd3670bf (diff)
downloadspack-001f90f411c0f13beb978c27b9ff2546a31777e0.tar.gz
spack-001f90f411c0f13beb978c27b9ff2546a31777e0.tar.bz2
spack-001f90f411c0f13beb978c27b9ff2546a31777e0.tar.xz
spack-001f90f411c0f13beb978c27b9ff2546a31777e0.zip
amrex: new version 20.11 (#19691)
* amrex: new version 20.11 * Fix formatting issues
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/amrex/package.py37
1 files changed, 17 insertions, 20 deletions
diff --git a/var/spack/repos/builtin/packages/amrex/package.py b/var/spack/repos/builtin/packages/amrex/package.py
index 31a28870c1..ebe3e34dff 100644
--- a/var/spack/repos/builtin/packages/amrex/package.py
+++ b/var/spack/repos/builtin/packages/amrex/package.py
@@ -18,6 +18,7 @@ class Amrex(CMakePackage):
maintainers = ['mic84', 'asalmgren']
version('develop', branch='development')
+ version('20.11', sha256='b86f4f2ebf414cec050e562d4ab81545944bda581b496d69767b4bf6a3060855')
version('20.10', sha256='92def480d1f0bcb5bcb9dfae2ddc8997060414386a1d71ccbfdad785fa2e46fa')
version('20.09', sha256='3ae203f18656117d8201da16e899a6144ec217817a2a5d9b7649e2eef9cacdf9')
version('20.08', sha256='a202430cd8dbef2de29b20fe9b5881cc58ee762326556ec3c0ad9c3f85ddfc2f')
@@ -106,31 +107,27 @@ class Amrex(CMakePackage):
url = "https://github.com/AMReX-Codes/amrex/archive/{0}.tar.gz"
return url.format(version.dotted)
- def cmake_is_on(self, option):
- return 'ON' if option in self.spec else 'OFF'
-
def cmake_args(self):
args = [
'-DUSE_XSDK_DEFAULTS=ON',
- '-DDIM:STRING=%s' % self.spec.variants['dimensions'].value,
- '-DBUILD_SHARED_LIBS:BOOL=%s' % self.cmake_is_on('+shared'),
- '-DENABLE_MPI:BOOL=%s' % self.cmake_is_on('+mpi'),
- '-DENABLE_OMP:BOOL=%s' % self.cmake_is_on('+openmp'),
+ self.define_from_variant('DIM', 'dimensions'),
+ self.define_from_variant('BUILD_SHARED_LIBS', 'shared'),
+ self.define_from_variant('ENABLE_MPI', 'mpi'),
+ self.define_from_variant('ENABLE_OMP', 'openmp'),
'-DXSDK_PRECISION:STRING=%s' %
self.spec.variants['precision'].value.upper(),
- '-DENABLE_EB:BOOL=%s' % self.cmake_is_on('+eb'),
- '-DXSDK_ENABLE_Fortran:BOOL=%s' % self.cmake_is_on('+fortran'),
- '-DENABLE_FORTRAN_INTERFACES:BOOL=%s'
- % self.cmake_is_on('+fortran'),
- '-DENABLE_LINEAR_SOLVERS:BOOL=%s' %
- self.cmake_is_on('+linear_solvers'),
- '-DENABLE_AMRDATA:BOOL=%s' % self.cmake_is_on('+amrdata'),
- '-DENABLE_PARTICLES:BOOL=%s' % self.cmake_is_on('+particles'),
- '-DENABLE_SUNDIALS:BOOL=%s' % self.cmake_is_on('+sundials'),
- '-DENABLE_HDF5:BOOL=%s' % self.cmake_is_on('+hdf5'),
- '-DENABLE_HYPRE:BOOL=%s' % self.cmake_is_on('+hypre'),
- '-DENABLE_PETSC:BOOL=%s' % self.cmake_is_on('+petsc'),
- '-DENABLE_CUDA:BOOL=%s' % self.cmake_is_on('+cuda'),
+ self.define_from_variant('XSDK_ENABLE_Fortran', 'fortran'),
+ self.define_from_variant('ENABLE_FORTRAN_INTERFACES', 'fortran'),
+ self.define_from_variant('ENABLE_EB', 'eb'),
+ self.define_from_variant('ENABLE_LINEAR_SOLVERS',
+ 'linear_solvers'),
+ self.define_from_variant('ENABLE_AMRDATA', 'amrdata'),
+ self.define_from_variant('ENABLE_PARTICLES', 'particles'),
+ self.define_from_variant('ENABLE_SUNDIALS', 'sundials'),
+ self.define_from_variant('ENABLE_HDF5', 'hdf5'),
+ self.define_from_variant('ENABLE_HYPRE', 'hypre'),
+ self.define_from_variant('ENABLE_PETSC', 'petsc'),
+ self.define_from_variant('ENABLE_CUDA', 'cuda'),
]
if self.spec.satisfies('%fj'):
args.append('-DCMAKE_Fortran_MODDIR_FLAG=-M')