aboutsummaryrefslogtreecommitdiff
path: root/example_packages/submodules/src
diff options
context:
space:
mode:
authorBrad Richardson <everythingfunctional@protonmail.com>2020-10-14 09:24:55 -0500
committerBrad Richardson <everythingfunctional@protonmail.com>2020-10-14 09:24:55 -0500
commitb5b16cf826d468e79b4087500192a4a9e07c140f (patch)
tree1f615ee9ed6500bb1f6964ef2af0478b2fe51e4e /example_packages/submodules/src
parentd3a65e36b28808c2c51ae41fc107f1179e27a08c (diff)
downloadfpm-b5b16cf826d468e79b4087500192a4a9e07c140f.tar.gz
fpm-b5b16cf826d468e79b4087500192a4a9e07c140f.zip
Better organize example packages and bootstrap tests
Diffstat (limited to 'example_packages/submodules/src')
-rw-r--r--example_packages/submodules/src/child1.f9016
-rw-r--r--example_packages/submodules/src/child2.f9010
-rw-r--r--example_packages/submodules/src/grandchild.f9010
-rw-r--r--example_packages/submodules/src/parent.f9015
4 files changed, 51 insertions, 0 deletions
diff --git a/example_packages/submodules/src/child1.f90 b/example_packages/submodules/src/child1.f90
new file mode 100644
index 0000000..dbd0fa5
--- /dev/null
+++ b/example_packages/submodules/src/child1.f90
@@ -0,0 +1,16 @@
+submodule(parent) child1
+implicit none
+
+interface
+ module function my_fun() result (b)
+ integer :: b
+ end function my_fun
+end interface
+
+contains
+
+module procedure my_sub1
+ a = 1
+end procedure my_sub1
+
+end submodule child1 \ No newline at end of file
diff --git a/example_packages/submodules/src/child2.f90 b/example_packages/submodules/src/child2.f90
new file mode 100644
index 0000000..179cc32
--- /dev/null
+++ b/example_packages/submodules/src/child2.f90
@@ -0,0 +1,10 @@
+submodule(parent) child2
+implicit none
+
+contains
+
+module procedure my_sub2
+ a = 2
+end procedure my_sub2
+
+end submodule child2 \ No newline at end of file
diff --git a/example_packages/submodules/src/grandchild.f90 b/example_packages/submodules/src/grandchild.f90
new file mode 100644
index 0000000..8c5aa17
--- /dev/null
+++ b/example_packages/submodules/src/grandchild.f90
@@ -0,0 +1,10 @@
+submodule(parent:child1) grandchild
+implicit none
+
+contains
+
+module procedure my_fun
+ b = 2
+end procedure my_fun
+
+end submodule grandchild \ No newline at end of file
diff --git a/example_packages/submodules/src/parent.f90 b/example_packages/submodules/src/parent.f90
new file mode 100644
index 0000000..570827c
--- /dev/null
+++ b/example_packages/submodules/src/parent.f90
@@ -0,0 +1,15 @@
+module parent
+implicit none
+
+interface
+
+ module subroutine my_sub1(a)
+ integer, intent(out) :: a
+ end subroutine my_sub1
+
+ module subroutine my_sub2(a)
+ integer, intent(out) :: a
+ end subroutine my_sub2
+end interface
+
+end module parent \ No newline at end of file