diff options
author | Tom Payerle <payerle@umd.edu> | 2021-07-21 15:24:51 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-21 21:24:51 +0200 |
commit | 5a49264e197576d55ef89c1e3452c67cc571b681 (patch) | |
tree | a629cab25fa61d5e86619ad58683d9bf5dc198d5 | |
parent | 4a4d1759f502eecac3df91ee6effc11ea3dab53c (diff) | |
download | spack-5a49264e197576d55ef89c1e3452c67cc571b681.tar.gz spack-5a49264e197576d55ef89c1e3452c67cc571b681.tar.bz2 spack-5a49264e197576d55ef89c1e3452c67cc571b681.tar.xz spack-5a49264e197576d55ef89c1e3452c67cc571b681.zip |
metis: suppress warnings causing issues for %nvhpc builds (#25014)
We add compilation flags when using %nvhpc to suppress warnings
(which due to global -Werror flag in the build get promoted to
errors) for the following:
Diagnostic 111: statement is unreachable
Diagnostic 177: variable "foo" was declared but never referenced
Diagnostic 188: enumerated type mixed with another type
Diagnostic 550: variable "foo" was set but never used
-rw-r--r-- | var/spack/repos/builtin/packages/metis/package.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/metis/package.py b/var/spack/repos/builtin/packages/metis/package.py index 36a1336bbd..193b41a6e2 100644 --- a/var/spack/repos/builtin/packages/metis/package.py +++ b/var/spack/repos/builtin/packages/metis/package.py @@ -53,6 +53,17 @@ class Metis(Package): # Ignore warnings/errors re unrecognized omp pragmas on %intel if '%intel@14:' in self.spec: env.append_flags('CFLAGS', '-diag-disable 3180') + # Ignore some warnings to get it to compile with %nvhpc + # 111: statement is unreachable + # 177: variable "foo" was declared but never referenced + # 188: enumerated type mixed with another type + # 550: variable "foo" was set but never used + if '%nvhpc' in self.spec: + env.append_flags('CFLAGS', '--display_error_number') + env.append_flags('CFLAGS', '--diag_suppress 111') + env.append_flags('CFLAGS', '--diag_suppress 177') + env.append_flags('CFLAGS', '--diag_suppress 188') + env.append_flags('CFLAGS', '--diag_suppress 550') @when('@5:') def patch(self): |