|
1 | | -if target_machine.system() == 'windows' or meson.get_compiler('c').get_id() == 'intel' |
2 | | - hdf5_default_warnings = [] |
3 | | -else |
4 | | - hdf5_default_warnings = ['-Wno-unused-result', |
5 | | - '-Wno-unused-parameter', |
6 | | - '-Wno-unused-variable', |
7 | | - '-Wno-unused-but-set-variable', |
8 | | - '-Wno-sign-compare', |
9 | | - '-Wno-stringop-overflow', |
10 | | - '-Wno-discarded-qualifiers', |
11 | | - '-Wno-error=maybe-uninitialized', |
12 | | - '-Wno-error=unused-function', |
13 | | - '-Wno-error=unused-label', |
14 | | - '-Wno-pedantic', |
15 | | - '-Wno-error=stringop-truncation', |
16 | | - '-Wno-error=cast-function-type', |
17 | | - '-Wno-stringop-truncation' |
18 | | - ] |
| 1 | +hdf5_default_warnings = [] |
| 2 | + |
| 3 | +if target_machine.system() != 'windows' and meson.get_compiler('c').get_id() != 'intel' |
| 4 | + desired_warnings = ['-Wno-unused-result', |
| 5 | + '-Wno-unused-parameter', |
| 6 | + '-Wno-unused-variable', |
| 7 | + '-Wno-unused-but-set-variable', |
| 8 | + '-Wno-sign-compare', |
| 9 | + '-Wno-stringop-overflow', |
| 10 | + '-Wno-error=discarded-qualifiers', |
| 11 | + '-Wno-error=maybe-uninitialized', |
| 12 | + '-Wno-error=unused-function', |
| 13 | + '-Wno-error=unused-label', |
| 14 | + '-Wno-pedantic', |
| 15 | + '-Wno-error=stringop-truncation', |
| 16 | + '-Wno-error=cast-function-type', |
| 17 | + '-Wno-stringop-truncation'] |
| 18 | + foreach flag : desired_warnings |
| 19 | + if meson.get_compiler('cpp').has_argument(flag) |
| 20 | + hdf5_default_warnings += flag |
| 21 | + endif |
| 22 | + endforeach |
19 | 23 | endif |
20 | 24 |
|
21 | 25 | cc = meson.get_compiler('c') |
|
0 commit comments