summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreugeneswalker <38933153+eugeneswalker@users.noreply.github.com>2024-04-18 10:11:24 -0700
committerGitHub <noreply@github.com>2024-04-18 10:11:24 -0700
commit019058226f1dc61c7f6239a07aec18e0bcc885e7 (patch)
tree2109531f15882fd9332092413b2c69e54007a1fc
parentac0040f67d610b0deee508c57489a6130fd4ee5e (diff)
downloadspack-019058226f1dc61c7f6239a07aec18e0bcc885e7.tar.gz
spack-019058226f1dc61c7f6239a07aec18e0bcc885e7.tar.bz2
spack-019058226f1dc61c7f6239a07aec18e0bcc885e7.tar.xz
spack-019058226f1dc61c7f6239a07aec18e0bcc885e7.zip
py-netcdf4 %oneapi: cflags append -Wno-error=int-conversion (#43629)
-rw-r--r--var/spack/repos/builtin/packages/py-netcdf4/package.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-netcdf4/package.py b/var/spack/repos/builtin/packages/py-netcdf4/package.py
index 84a28e0f33..b681279038 100644
--- a/var/spack/repos/builtin/packages/py-netcdf4/package.py
+++ b/var/spack/repos/builtin/packages/py-netcdf4/package.py
@@ -48,6 +48,13 @@ class PyNetcdf4(PythonPackage):
# following patch disables the usage of pkg-config at all.
patch("disable_pkgconf.patch")
+ def flag_handler(self, name, flags):
+ if name == "cflags":
+ if self.spec.satisfies("%oneapi"):
+ flags.append("-Wno-error=int-conversion")
+
+ return flags, None, None
+
def setup_build_environment(self, env):
"""Ensure installed netcdf and hdf5 libraries are used"""
# Explicitly set these variables so setup.py won't erroneously pick up