From f2963e41ba04300c77912a76edce4224f80cc382 Mon Sep 17 00:00:00 2001 From: eugeneswalker <38933153+eugeneswalker@users.noreply.github.com> Date: Fri, 27 Oct 2023 11:08:33 -0700 Subject: mgard@2020-10-01 %oneapi@2023: turn of c++11-narrowing via cxxflags (#40743) --- var/spack/repos/builtin/packages/mgard/package.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/var/spack/repos/builtin/packages/mgard/package.py b/var/spack/repos/builtin/packages/mgard/package.py index b58f4c0bba..411dd0c9b9 100644 --- a/var/spack/repos/builtin/packages/mgard/package.py +++ b/var/spack/repos/builtin/packages/mgard/package.py @@ -59,6 +59,12 @@ class Mgard(CMakePackage, CudaPackage): ) conflicts("%gcc@:7", when="@2022-11-18:", msg="requires std::optional and other c++17 things") + def flag_handler(self, name, flags): + if name == "cxxflags": + if self.spec.satisfies("@2020-10-01 %oneapi@2023:"): + flags.append("-Wno-error=c++11-narrowing") + return (flags, None, None) + def cmake_args(self): spec = self.spec args = ["-DBUILD_TESTING=OFF"] -- cgit v1.2.3-70-g09d2