Skip to content

Commit c24ea66

Browse files
authored
Merge branch 'main' into package_by_package
2 parents 5253412 + 408e96a commit c24ea66

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1396
-91
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Binaries for the latest stable release are available [to download](https://githu
3737

3838
__Note:__ On Linux and MacOS, you will need to enable executable permission before you can use the binary.
3939

40-
_e.g._ `$ chmod u+x fpm-0.5.0-linux-x86_64`
40+
_e.g._ `$ chmod u+x fpm-0.6.0-linux-x86_64`
4141

4242
The binaries at the [current tag](https://github.com/fortran-lang/fpm/releases/tag/current) are updated automatically to always provide the current git version from the default branch.
4343

ci/run_tests.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,22 @@ test ! -x ./build/gfortran_*/app/unused
6262
test ! -x ./build/gfortran_*/test/unused_test
6363
popd
6464

65+
pushd tree_shake
66+
"$fpm" build
67+
"$fpm" run
68+
"$fpm" test
69+
test ! -e ./build/gfortran_*/tree_shake/src_farewell_m.f90.o
70+
test ! -e ./build/gfortran_*/tree_shake/src_farewell_m.f90.o.log
71+
popd
72+
73+
pushd submodule_tree_shake
74+
"$fpm" run
75+
test ! -e ./build/gfortran_*/submodule_tree_shake/src_parent_unused.f90.o
76+
test ! -e ./build/gfortran_*/submodule_tree_shake/src_parent_unused.f90.o.log
77+
test ! -e ./build/gfortran_*/submodule_tree_shake/src_child_unused.f90.o
78+
test ! -e ./build/gfortran_*/submodule_tree_shake/src_child_unused.f90.o.log
79+
popd
80+
6581
pushd version_file
6682
"$fpm" build
6783
"$fpm" run

example_packages/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ the features demonstrated in each package and which versions of fpm are supporte
2020
| makefile_complex | External build command (makefile); local path dependency | Y | N |
2121
| program_with_module | App-only; module+program in single source file | Y | Y |
2222
| submodules | Lib-only; submodules (3 levels) | N | Y |
23+
| tree_shake | Test tree-shaking/pruning of unused module dependencies | N | Y |
24+
| submodule_tree_shake| Test tree-shaking/pruning with submodules dependencies | N | Y |
2325
| link_external | Link external library | N | Y |
2426
| link_executable | Link external library to a single executable | N | Y |
2527
| version_file | Read version number from a file in the project root | N | Y |
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build/*
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name = "preprocess_cpp"
2+
3+
[preprocess]
4+
[preprocess.cpp]
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module preprocess_cpp
2+
implicit none
3+
private
4+
5+
public :: say_hello
6+
contains
7+
subroutine say_hello
8+
print *, "Hello, preprocess_cpp!"
9+
#ifndef TESTMACRO
10+
This breaks the build.
11+
#endif
12+
end subroutine say_hello
13+
end module preprocess_cpp
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
build/*
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
program test
2+
use parent
3+
4+
integer :: a, b
5+
6+
call my_sub1(a)
7+
call my_sub2(b)
8+
9+
end program test
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
name = "submodule_tree_shake"
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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

0 commit comments

Comments
 (0)