Skip to content

Commit 0afece2

Browse files
authored
Add variant openmp for package esmf (spack#2635)
1 parent 6f0e643 commit 0afece2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

repos/spack_repo/builtin/packages/esmf/package.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ class Esmf(MakefilePackage, PythonExtension):
4646
version("8.0.1", sha256="13ce2ca0ae622548c00f7bb18317fb100235ca8b7ddbfac7e201a339e8eb05a3")
4747

4848
variant("mpi", default=True, description="Build with MPI support")
49+
variant("openmp", default=True, description="Build with OpenMP support")
4950
variant("external-lapack", default=False, description="Build with external LAPACK library")
5051
variant("netcdf", default=True, description="Build with NetCDF support")
5152
variant("pnetcdf", default=False, description="Build with pNetCDF support")
@@ -312,6 +313,15 @@ def setup_build_environment(self, env: EnvironmentModifications) -> None:
312313
if comm_variant != "auto":
313314
env.set("ESMF_COMM", comm_variant)
314315

316+
##########
317+
# OpenMP #
318+
##########
319+
320+
if spec.satisfies("+openmp"):
321+
env.set("ESMF_OPENMP", "ON")
322+
else:
323+
env.set("ESMF_OPENMP", "OFF")
324+
315325
##########
316326
# LAPACK #
317327
##########

0 commit comments

Comments
 (0)