diff options
author | Ondřej Čertík <ondrej@certik.us> | 2020-09-21 09:07:24 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-21 09:07:24 -0600 |
commit | 313fe327f6dcc71b023d9f32a0650d5cf25ce009 (patch) | |
tree | 12914c1d9ffe8912587a8844119b0f16bb672edd /test/example_packages/submodules | |
parent | db21f136948defe34e3899def604640e9ecfcc86 (diff) | |
parent | db67194d936181916bcef873e9317b3cf5048c3d (diff) | |
download | fpm-313fe327f6dcc71b023d9f32a0650d5cf25ce009.tar.gz fpm-313fe327f6dcc71b023d9f32a0650d5cf25ce009.zip |
Merge pull request #178 from LKedward/more_examples
Add more example packages
Diffstat (limited to 'test/example_packages/submodules')
-rw-r--r-- | test/example_packages/submodules/fpm.toml | 1 | ||||
-rw-r--r-- | test/example_packages/submodules/src/child1.f90 | 16 | ||||
-rw-r--r-- | test/example_packages/submodules/src/child2.f90 | 10 | ||||
-rw-r--r-- | test/example_packages/submodules/src/grandchild.f90 | 10 | ||||
-rw-r--r-- | test/example_packages/submodules/src/parent.f90 | 15 |
5 files changed, 52 insertions, 0 deletions
diff --git a/test/example_packages/submodules/fpm.toml b/test/example_packages/submodules/fpm.toml new file mode 100644 index 0000000..cfc3d61 --- /dev/null +++ b/test/example_packages/submodules/fpm.toml @@ -0,0 +1 @@ +name = "submodules" diff --git a/test/example_packages/submodules/src/child1.f90 b/test/example_packages/submodules/src/child1.f90 new file mode 100644 index 0000000..dbd0fa5 --- /dev/null +++ b/test/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/test/example_packages/submodules/src/child2.f90 b/test/example_packages/submodules/src/child2.f90 new file mode 100644 index 0000000..179cc32 --- /dev/null +++ b/test/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/test/example_packages/submodules/src/grandchild.f90 b/test/example_packages/submodules/src/grandchild.f90 new file mode 100644 index 0000000..8c5aa17 --- /dev/null +++ b/test/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/test/example_packages/submodules/src/parent.f90 b/test/example_packages/submodules/src/parent.f90 new file mode 100644 index 0000000..570827c --- /dev/null +++ b/test/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 |