summaryrefslogtreecommitdiffstats
path: root/test cases/fortran/19 fortran_std/meson.build
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-29 04:41:38 +0000
commit7b6e527f440cd7e6f8be2b07cee320ee6ca18786 (patch)
tree4a2738d69fa2814659fdadddf5826282e73d81f4 /test cases/fortran/19 fortran_std/meson.build
parentInitial commit. (diff)
downloadmeson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.tar.xz
meson-7b6e527f440cd7e6f8be2b07cee320ee6ca18786.zip
Adding upstream version 1.0.1.upstream/1.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test cases/fortran/19 fortran_std/meson.build')
-rw-r--r--test cases/fortran/19 fortran_std/meson.build27
1 files changed, 27 insertions, 0 deletions
diff --git a/test cases/fortran/19 fortran_std/meson.build b/test cases/fortran/19 fortran_std/meson.build
new file mode 100644
index 0000000..f46f8ff
--- /dev/null
+++ b/test cases/fortran/19 fortran_std/meson.build
@@ -0,0 +1,27 @@
+project('FortranStd', 'fortran',
+ default_options: ['warning_level=0'])
+# As with C and C++, each Fortran compiler + version has a subset of supported Fortran standards
+# Additionally, a necessary option for non-standard Fortran projects is the "legacy"
+# option, which allows non-standard syntax and behavior quirks.
+# Thus "legacy" is a necessity for some old but important Fortran projects.
+# By default, popular Fortran compilers disallow these quirks without "legacy" option.
+
+fc = meson.get_compiler('fortran')
+
+executable('stdnone', 'std95.f90')
+
+executable('std_legacy', 'legacy.f', override_options : ['fortran_std=legacy'])
+
+executable('std_95', 'std95.f90', override_options : ['fortran_std=f95'])
+
+executable('std_f2003', 'std2003.f90', override_options : ['fortran_std=f2003'])
+
+executable('std_f2008', 'std2008.f90', override_options : ['fortran_std=f2008'])
+
+if fc.get_id() == 'gcc'
+ if fc.version().version_compare('>=8.0')
+ executable('std_f2018', 'std2018.f90', override_options : ['fortran_std=f2018'])
+ endif
+else
+ executable('std_f2018', 'std2018.f90', override_options : ['fortran_std=f2018'])
+endif \ No newline at end of file