diff options
author | Alex Richert <82525672+AlexanderRichert-NOAA@users.noreply.github.com> | 2023-04-04 01:01:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-04 10:01:21 +0200 |
commit | 5da231969e932c2ca132be88754ebe8828b646e5 (patch) | |
tree | a7cdb30ae7713369638106f6c4adc0ec8eefd069 /var | |
parent | c3b0806f6ce5b62fa2f08924ea0b130bf37c7e16 (diff) | |
download | spack-5da231969e932c2ca132be88754ebe8828b646e5.tar.gz spack-5da231969e932c2ca132be88754ebe8828b646e5.tar.bz2 spack-5da231969e932c2ca132be88754ebe8828b646e5.tar.xz spack-5da231969e932c2ca132be88754ebe8828b646e5.zip |
esmf: add static netcdf-c support (#34579)
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/esmf/package.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/esmf/package.py b/var/spack/repos/builtin/packages/esmf/package.py index a874213901..77bfe8fac7 100644 --- a/var/spack/repos/builtin/packages/esmf/package.py +++ b/var/spack/repos/builtin/packages/esmf/package.py @@ -343,6 +343,11 @@ class Esmf(MakefilePackage): # NetCDF format. env.set("ESMF_NETCDF", "nc-config") env.set("ESMF_NFCONFIG", "nf-config") + netcdfc = spec["netcdf-c"] + if netcdfc.satisfies("~shared"): + nc_config = which(os.path.join(netcdfc.prefix.bin, "nc-config")) + nc_flags = nc_config("--libs", output=str).strip() + env.set("ESMF_NETCDF_LIBS", nc_flags) ################### # Parallel-NetCDF # |