aboutsummaryrefslogtreecommitdiffstats
path: root/meson/test cases/fortran/6 dynamic/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson/test cases/fortran/6 dynamic/meson.build')
-rw-r--r--meson/test cases/fortran/6 dynamic/meson.build13
1 files changed, 13 insertions, 0 deletions
diff --git a/meson/test cases/fortran/6 dynamic/meson.build b/meson/test cases/fortran/6 dynamic/meson.build
new file mode 100644
index 000000000..413223b0a
--- /dev/null
+++ b/meson/test cases/fortran/6 dynamic/meson.build
@@ -0,0 +1,13 @@
+project('dynamic_fortran', 'fortran')
+
+fcid = meson.get_compiler('fortran').get_id()
+if fcid == 'intel-cl' or (host_machine.system() == 'windows' and fcid == 'pgi')
+ error('MESON_SKIP_TEST: non-Gfortran Windows Fortran compilers do not do shared libraries in a Fortran standard way')
+ # !DEC$ ATTRIBUTES DLLEXPORT must be used!
+ # https://software.intel.com/en-us/node/535306
+ # https://www.pgroup.com/resources/docs/19.4/x86/pgi-user-guide/index.htm#lib-dynlnk-bld-dll-fort
+endif
+
+dynamic = shared_library('dynamic', 'dynamic.f90')
+exe = executable('test_exe', 'main.f90', link_with : dynamic)
+test('dynamic-fortran', exe)