Debian Codegraph @

test cases/fortran/19 fortran_std/meson.build

raw
1 project('FortranStd', 'fortran',
2 default_options: ['warning_level=0'])
3 # As with C and C++, each Fortran compiler + version has a subset of supported Fortran standards
4 # Additionally, a necessary option for non-standard Fortran projects is the "legacy"
5 # option, which allows non-standard syntax and behavior quirks.
6 # Thus "legacy" is a necessity for some old but important Fortran projects.
7 # By default, popular Fortran compilers disallow these quirks without "legacy" option.
8
9 fc = meson.get_compiler('fortran')
10
11 executable('stdnone', 'std95.f90')
12
13 executable('std_legacy', 'legacy.f', override_options : ['fortran_std=legacy'])
14
15 executable('std_95', 'std95.f90', override_options : ['fortran_std=f95'])
16
17 executable('std_f2003', 'std2003.f90', override_options : ['fortran_std=f2003'])
18
19 executable('std_f2008', 'std2008.f90', override_options : ['fortran_std=f2008'])
20
21 if fc.get_id() == 'gcc'
22 if fc.version().version_compare('>=8.0')
23 executable('std_f2018', 'std2018.f90', override_options : ['fortran_std=f2018'])
24 endif
25 else
26 executable('std_f2018', 'std2018.f90', override_options : ['fortran_std=f2018'])
27 endif