add openmp variant to lammps (#11643)

* add openmp variant to lammps

* add conflict for %gcc@9: and +openmp
This commit is contained in:
Jeffrey Salmond 2019-06-07 13:43:13 +01:00 committed by Christoph Junghans
parent 06cc799fd3
commit 9c1c50fb76

View File

@ -59,6 +59,7 @@ def url_for_version(self, version):
description='Build the liblammps in addition to the executable')
variant('mpi', default=True,
description='Build with mpi')
variant('openmp', default=True, description='Build with OpenMP')
variant('exceptions', default=False,
description='Build with lammps exceptions')
@ -87,6 +88,7 @@ def url_for_version(self, version):
conflicts('+user-misc', when='~manybody')
conflicts('+user-phonon', when='~kspace')
conflicts('+user-misc', when='~manybody')
conflicts('%gcc@9:', when='+openmp')
patch("lib.patch", when="@20170901")
patch("660.patch", when="@20170922")
@ -109,7 +111,9 @@ def cmake_args(self):
'ON' if '+exceptions' in spec else 'OFF'),
'-D{0}_MPI={1}'.format(
mpi_prefix,
'ON' if '+mpi' in spec else 'OFF')
'ON' if '+mpi' in spec else 'OFF'),
'-DBUILD_OMP={0}'.format(
'ON' if '+openmp' in spec else 'OFF'),
]
if spec.satisfies('@20180629:+lib'):