ncl: fix compilation errors with Intel compilers (#17391)

The Intel compilers are more strict and require special command
line options (like -std=c99) to properly compile NCL.
This commit is contained in:
TZ 2020-07-08 08:42:49 +02:00 committed by GitHub
parent f85da868ac
commit 084994db9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -144,7 +144,9 @@ def prepare_site_config(self):
c2f_flags.extend(['-lgfortran', '-lm'])
elif self.compiler.name == 'intel':
fc_flags.append('-fp-model precise')
cc_flags.append('-fp-model precise')
cc_flags.append('-fp-model precise'
' -std=c99'
' -D_POSIX_C_SOURCE=2 -D_GNU_SOURCE')
c2f_flags.extend(['-lifcore', '-lifport'])
if self.spec.satisfies('%gcc@10:'):