metis: Ignore pragma omp warnings/errors with %intel (#19049)

It looks like intel compilers generate warnings for omp pragmas when
openmp flag is not given, which due to other flags set get promoted to
errors.

This adds a flag to ignore the pragma omp warnings (icc diagnostic
number 3180 on %intel@14:).
This commit is contained in:
Tom Payerle 2020-10-02 17:08:48 -04:00 committed by GitHub
parent c4a0c50036
commit a07c3d2aa8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,6 +55,11 @@ class Metis(Package):
patch('install_gklib_defs_rename.patch', when='@5:') patch('install_gklib_defs_rename.patch', when='@5:')
patch('gklib_nomisleadingindentation_warning.patch', when='@5: %gcc@6:') patch('gklib_nomisleadingindentation_warning.patch', when='@5: %gcc@6:')
def setup_build_environment(self, env):
# Ignore warnings/errors re unrecognized omp pragmas on %intel
if '%intel@14:' in self.spec:
env.append_flags('CFLAGS', '-diag-disable 3180')
@when('@5:') @when('@5:')
def patch(self): def patch(self):
source_path = self.stage.source_path source_path = self.stage.source_path