summaryrefslogtreecommitdiff
path: root/tests/projects/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'tests/projects/fortran')
-rw-r--r--tests/projects/fortran/static_library/src/main.f905
-rw-r--r--tests/projects/fortran/static_library/src/test.f908
-rw-r--r--tests/projects/fortran/static_library/xmake.lua11
3 files changed, 24 insertions, 0 deletions
diff --git a/tests/projects/fortran/static_library/src/main.f90 b/tests/projects/fortran/static_library/src/main.f90
new file mode 100644
index 000000000..9adea3e26
--- /dev/null
+++ b/tests/projects/fortran/static_library/src/main.f90
@@ -0,0 +1,5 @@
+program hello
+ use test, only: print_hello
+ implicit none (type, external)
+ call print_hello()
+end program hello
diff --git a/tests/projects/fortran/static_library/src/test.f90 b/tests/projects/fortran/static_library/src/test.f90
new file mode 100644
index 000000000..b1e97a36c
--- /dev/null
+++ b/tests/projects/fortran/static_library/src/test.f90
@@ -0,0 +1,8 @@
+module test
+ implicit none (type, external)
+
+contains
+ subroutine print_hello()
+ print *, "Hello World!"
+ end subroutine print_hello
+end module test
diff --git a/tests/projects/fortran/static_library/xmake.lua b/tests/projects/fortran/static_library/xmake.lua
new file mode 100644
index 000000000..694755de5
--- /dev/null
+++ b/tests/projects/fortran/static_library/xmake.lua
@@ -0,0 +1,11 @@
+add_rules("mode.debug", "mode.release")
+
+target("testlib")
+ set_kind("static")
+ add_files("src/test.f90")
+
+target("test")
+ set_kind("binary")
+ add_deps("testlib")
+ add_files("src/main.f90")
+