aboutsummaryrefslogtreecommitdiff
path: root/test cases/fortran/11 compiles links runs
diff options
context:
space:
mode:
authorMichael Hirsch, Ph.D <scivision@users.noreply.github.com>2019-01-29 16:25:23 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2019-01-29 23:25:23 +0200
commitcccffaa29d63503128803b848bd4843cc942538d (patch)
treeee4e792eab40df529d99b7a10e2dc399085405aa /test cases/fortran/11 compiles links runs
parentda34bea893b3b309800e0f03021a99ee58c599d6 (diff)
downloadmeson-cccffaa29d63503128803b848bd4843cc942538d.zip
meson-cccffaa29d63503128803b848bd4843cc942538d.tar.gz
meson-cccffaa29d63503128803b848bd4843cc942538d.tar.bz2
BUGFIX: allow fc.run(code) to work, pick only Fortran module
Diffstat (limited to 'test cases/fortran/11 compiles links runs')
-rw-r--r--test cases/fortran/11 compiles links runs/meson.build20
1 files changed, 20 insertions, 0 deletions
diff --git a/test cases/fortran/11 compiles links runs/meson.build b/test cases/fortran/11 compiles links runs/meson.build
new file mode 100644
index 0000000..81eb907
--- /dev/null
+++ b/test cases/fortran/11 compiles links runs/meson.build
@@ -0,0 +1,20 @@
+project('compiles_links_runs', 'fortran')
+
+fc = meson.get_compiler('fortran')
+
+code = '''error stop 123; end'''
+
+if not fc.compiles(code)
+ error('Fortran 2008 code failed to compile')
+endif
+
+if not fc.links(code)
+ error('Fortran 2008 code failed to link')
+endif
+
+if fc.run(code).returncode() != 123
+ error('Fortran 2008 code failed to run')
+endif
+
+
+