Skip to content

Commit 358bdd3

Browse files
committed
Add example package: preprocess_cpp_deps
1 parent 78cdc49 commit 358bdd3

File tree

6 files changed

+31
-0
lines changed

6 files changed

+31
-0
lines changed

ci/run_tests.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ pushd preprocess_cpp_c
142142
"$fpm" run
143143
popd
144144

145+
pushd preprocess_cpp_deps
146+
"$fpm" build
147+
popd
148+
145149
pushd preprocess_hello
146150
"$fpm" build
147151
popd

example_packages/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ the features demonstrated in each package and which versions of fpm are supporte
2727
| makefile_complex | External build command (makefile); local path dependency | Y | N |
2828
| preprocess_cpp | Lib only; C preprocessing; Macro parsing | N | Y |
2929
| preprocess_cpp_c | C App; progate macros from fpm.toml to app | N | Y |
30+
| preprocess_cpp_deps | App; cpp preprocessor settings in local path dependency only | N | Y |
3031
| preprocess_hello | App only; Macros remain local to the package | N | Y |
3132
| preprocess_hello_dependency | Lib only; Macros not getting passed here from root | N | Y |
3233
| program_with_module | App-only; module+program in single source file | Y | Y |
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
program hello_fpm
2+
use utils, only: say_hello
3+
4+
call say_hello()
5+
6+
end program hello_fpm
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name = "utils"
2+
3+
[preprocess]
4+
[preprocess.cpp]
5+
macros = ["X=1"]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module utils
2+
3+
implicit none
4+
5+
contains
6+
7+
subroutine say_hello()
8+
print '(a,1x,i0)', "Hello, X =", X
9+
end subroutine say_hello
10+
11+
end module utils
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
name = "preprocess_cpp_deps"
2+
3+
[dependencies]
4+
utils = { path = "crate/utils" }

0 commit comments

Comments
 (0)