Skip to content

Commit f2a5119

Browse files
committed
Add: example package with single source program and module
1 parent 5f7e4e5 commit f2a5119

File tree

5 files changed

+38
-12
lines changed

5 files changed

+38
-12
lines changed

ci/run_tests.bat

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,14 @@ cd ..\submodules
5858
if errorlevel 1 exit 1
5959

6060
..\..\..\fpm\build\gfortran_debug\app\fpm build
61+
if errorlevel 1 exit 1
62+
63+
64+
cd ..\program_with_module
65+
if errorlevel 1 exit 1
66+
67+
..\..\..\fpm\build\gfortran_debug\app\fpm build
68+
if errorlevel 1 exit 1
69+
70+
.\build\gfortran_debug\app\Program_with_module
6171
if errorlevel 1 exit 1

ci/run_tests.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,8 @@ cd ../with_c
2424
./build/gfortran_debug/app/with_c
2525

2626
cd ../submodules
27-
../../../fpm/build/gfortran_debug/app/fpm build
27+
../../../fpm/build/gfortran_debug/app/fpm build
28+
29+
cd ../program_with_module
30+
../../../fpm/build/gfortran_debug/app/fpm build
31+
./build/gfortran_debug/app/Program_with_module

test/example_packages/README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ See the table below for a list of the example packages provided in this director
44
the features demonstrated in each package and which versions of fpm are supported.
55

66

7-
| Name | Features | Bootstrap (Haskell) fpm | fpm |
8-
|------------------|---------------------------------------------------------------|:-----------------------:|:---:|
9-
| circular_example | Local path dependency; circular dependency | Y | N |
10-
| circular_test | Local path dependency; circular dependency | Y | N |
11-
| hello_complex | Non-standard directory layout; multiple tests and executables | Y | Y |
12-
| hello_fpm | App-only; local path dependency | Y | N |
13-
| hello_world | App-only | Y | Y |
14-
| makefile_complex | External build command (makefile); local path dependency | Y | N |
15-
| submodules | Lib-only; submodules (3 levels) | N | Y |
16-
| with_c | Compile with `c` source files | N | Y |
17-
| with_makefile | External build command (makefile) | Y | N |
7+
| Name | Features | Bootstrap (Haskell) fpm | fpm |
8+
|---------------------|---------------------------------------------------------------|:-----------------------:|:---:|
9+
| circular_example | Local path dependency; circular dependency | Y | N |
10+
| circular_test | Local path dependency; circular dependency | Y | N |
11+
| hello_complex | Non-standard directory layout; multiple tests and executables | Y | Y |
12+
| hello_fpm | App-only; local path dependency | Y | N |
13+
| hello_world | App-only | Y | Y |
14+
| makefile_complex | External build command (makefile); local path dependency | Y | N |
15+
| program_with_module | App-only; module+program in single source file | Y | Y |
16+
| submodules | Lib-only; submodules (3 levels) | N | Y |
17+
| with_c | Compile with `c` source files | N | Y |
18+
| with_makefile | External build command (makefile) | Y | N |
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module greet_m
2+
implicit none
3+
character(*), parameter :: greeting = 'Hello, fpm!'
4+
end module greet_m
5+
6+
program program_with_module
7+
use greet_m, only: greeting
8+
implicit none
9+
print *, greeting
10+
end program program_with_module
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
name = "Program_with_module"

0 commit comments

Comments
 (0)