Skip to content

Commit f418062

Browse files
authored
Support for dependency path relative to the fpm.toml it’s written in (#719)
2 parents 1f2831f + 40aaa48 commit f418062

File tree

20 files changed

+98
-23
lines changed

20 files changed

+98
-23
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ or from [miniconda](https://docs.conda.io/en/latest/miniconda.html).
6666

6767
#### [MSYS2]
6868

69-
Fpm is available as MinGW package in the MSYS2 package manager.
69+
Fpm is available as MinGW package in the MSYS2 package manager,
70+
which supports parallelization of the target compilation.
7071
To install fpm with pacman use
7172

7273
```

ci/run_tests.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ pushd c_main
118118
"$fpm" run
119119
popd
120120

121+
pushd hello_fpm_path
122+
"$fpm" run
123+
popd
124+
121125
pushd preprocess_cpp
122126
"$fpm" build
123127
popd
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
program hello_fpm
2+
use utils1_m, only: say_hello1
3+
use utils1_1_m, only: say_hello1_1
4+
use utils2_m, only: say_hello2
5+
6+
call say_hello1()
7+
call say_hello1_1()
8+
call say_hello2()
9+
10+
end program hello_fpm
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name = "utils1"
2+
3+
[dependencies]
4+
utils1_1 = { path = "../utils1_1" }
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module utils1_m
2+
3+
implicit none
4+
5+
contains
6+
7+
subroutine say_hello1()
8+
print '(a)', "Hello, utils1."
9+
end subroutine say_hello1
10+
11+
end module utils1_m
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
name = "utils1_1"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module utils1_1_m
2+
3+
implicit none
4+
5+
contains
6+
7+
subroutine say_hello1_1()
8+
print '(a)', "Hello, utils1_1."
9+
end subroutine say_hello1_1
10+
11+
end module utils1_1_m
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
name = "utils2"
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module utils2_m
2+
3+
implicit none
4+
5+
contains
6+
7+
subroutine say_hello2()
8+
print '(a)', "Hello, utils2."
9+
end subroutine say_hello2
10+
11+
end module utils2_m
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name = "hello_fpm_path"
2+
3+
[dependencies]
4+
utils1 = { path = "crate/utils1" }
5+
utils2 = { path = "crate/utils2" }

0 commit comments

Comments
 (0)