lammps: add lammps_sizes variant (#31182)

This is translated to CMakes LAMMS_SIZES variable. Used to select integer sizes.

Co-authored-by: Stephen Sachs <stesachs@amazon.com>
This commit is contained in:
Stephen Sachs 2022-06-20 11:39:03 +02:00 committed by GitHub
parent bc438ed4e9
commit 14349cb882
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -117,6 +117,13 @@ def url_for_version(self, version):
description='(CUDA only) Enable tweaks for running ' +
'with Nvidia CUDA Multi-process services daemon')
variant(
'lammps_sizes', default='smallbig',
description='LAMMPS integer sizes (smallsmall: all 32-bit, smallbig:' +
'64-bit #atoms #timesteps, bigbig: also 64-bit imageint, 64-bit atom ids)',
values=('smallbig', 'bigbig', 'smallsmall'), multi=False
)
depends_on('mpi', when='+mpi')
depends_on('mpi', when='+mpiio')
depends_on('fftw-api@3', when='+kspace')
@ -220,6 +227,9 @@ def cmake_args(self):
cxx_flags = '-Ofast -mfma -fvectorize -funroll-loops'
args.append(self.define('CMAKE_CXX_FLAGS_RELEASE', cxx_flags))
lammps_sizes = self.spec.variants['lammps_sizes'].value
args.append(self.define('LAMMPS_SIZES', lammps_sizes))
args.append(self.define_from_variant('WITH_JPEG', 'jpeg'))
args.append(self.define_from_variant('WITH_PNG', 'png'))
args.append(self.define_from_variant('WITH_FFMPEG', 'ffmpeg'))