File tree Expand file tree Collapse file tree 10 files changed +82
-0
lines changed Expand file tree Collapse file tree 10 files changed +82
-0
lines changed Original file line number Diff line number Diff line change @@ -92,6 +92,10 @@ pushd submodules
92
92
" $fpm " build
93
93
popd
94
94
95
+ pushd app_with_submodule
96
+ " $fpm " run --all
97
+ popd
98
+
95
99
pushd program_with_module
96
100
" $fpm " build
97
101
" $fpm " run --target Program_with_module
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ the features demonstrated in each package and which versions of fpm are supporte
7
7
| Name | Features | Bootstrap (Haskell) fpm | fpm |
8
8
| ---------------------| ---------------------------------------------------------------| :-----------------------:| :---:|
9
9
| auto_discovery_off | Default layout with auto-discovery disabled | N | Y |
10
+ | app_with_submodule | Submodules located in app directory (not src) | N | Y |
10
11
| c_header_only | C header-only library | N | Y |
11
12
| c_includes | C library with c include directory and dependency includes | N | Y |
12
13
| circular_example | Local path dependency; circular dependency | Y | Y |
Original file line number Diff line number Diff line change
1
+ build /*
Original file line number Diff line number Diff line change
1
+ submodule(parent) child1
2
+ implicit none
3
+
4
+ interface
5
+ module function my_fun () result (b)
6
+ integer :: b
7
+ end function my_fun
8
+ end interface
9
+
10
+ contains
11
+
12
+ module procedure my_sub1
13
+ a = my_fun()
14
+ end procedure my_sub1
15
+
16
+ end submodule child1
Original file line number Diff line number Diff line change
1
+ submodule(parent:child1) grandchild
2
+ implicit none
3
+
4
+ contains
5
+
6
+ module procedure my_fun
7
+ b = 1
8
+ end procedure my_fun
9
+
10
+ end submodule grandchild
Original file line number Diff line number Diff line change
1
+ program test
2
+ use parent
3
+ implicit none
4
+
5
+ integer :: a
6
+
7
+ call my_sub1(a)
8
+
9
+ if (a /= 1 ) then
10
+ write (* ,* ) ' FAILED: Unexpected value of a'
11
+ stop 1
12
+ end if
13
+
14
+ end program test
Original file line number Diff line number Diff line change
1
+ submodule(parent) child2
2
+ implicit none
3
+
4
+ contains
5
+
6
+ module procedure my_sub1
7
+ a = 2
8
+ end procedure my_sub1
9
+
10
+ end submodule child2
Original file line number Diff line number Diff line change
1
+ program test
2
+ use parent
3
+ implicit none
4
+
5
+ integer :: a
6
+
7
+ call my_sub1(a)
8
+
9
+ if (a /= 2 ) then
10
+ write (* ,* ) ' FAILED: Unexpected value of a'
11
+ stop 1
12
+ end if
13
+
14
+ end program test
Original file line number Diff line number Diff line change
1
+ name = " app_with_submodule"
Original file line number Diff line number Diff line change
1
+ module parent
2
+ implicit none
3
+
4
+ interface
5
+
6
+ module subroutine my_sub1 (a )
7
+ integer , intent (out ) :: a
8
+ end subroutine my_sub1
9
+ end interface
10
+
11
+ end module parent
You can’t perform that action at this time.
0 commit comments