From c41c39e36cc1e10699a47d5eca6da396f0173a64 Mon Sep 17 00:00:00 2001 From: LKedward Date: Sun, 7 Mar 2021 11:48:49 +0000 Subject: Add: example packages for include directories --- example_packages/fortran_includes/.gitignore | 1 + example_packages/fortran_includes/fpm.toml | 4 ++++ example_packages/fortran_includes/inc/parameters.f90 | 1 + example_packages/fortran_includes/src/lib.f90 | 14 ++++++++++++++ 4 files changed, 20 insertions(+) create mode 100644 example_packages/fortran_includes/.gitignore create mode 100644 example_packages/fortran_includes/fpm.toml create mode 100644 example_packages/fortran_includes/inc/parameters.f90 create mode 100644 example_packages/fortran_includes/src/lib.f90 (limited to 'example_packages/fortran_includes') diff --git a/example_packages/fortran_includes/.gitignore b/example_packages/fortran_includes/.gitignore new file mode 100644 index 0000000..a007fea --- /dev/null +++ b/example_packages/fortran_includes/.gitignore @@ -0,0 +1 @@ +build/* diff --git a/example_packages/fortran_includes/fpm.toml b/example_packages/fortran_includes/fpm.toml new file mode 100644 index 0000000..8557b72 --- /dev/null +++ b/example_packages/fortran_includes/fpm.toml @@ -0,0 +1,4 @@ +name = "fortran_includes" + +[library] +include-dir = "inc" diff --git a/example_packages/fortran_includes/inc/parameters.f90 b/example_packages/fortran_includes/inc/parameters.f90 new file mode 100644 index 0000000..e9e1af5 --- /dev/null +++ b/example_packages/fortran_includes/inc/parameters.f90 @@ -0,0 +1 @@ +integer, parameter :: dp = kind(0.d0) \ No newline at end of file diff --git a/example_packages/fortran_includes/src/lib.f90 b/example_packages/fortran_includes/src/lib.f90 new file mode 100644 index 0000000..a27a001 --- /dev/null +++ b/example_packages/fortran_includes/src/lib.f90 @@ -0,0 +1,14 @@ +module test_mod + implicit none + + include "parameters.f90" + + contains + + subroutine test_sub(a) + real(dp), intent(in) :: a + + write(*,*) 'a: ', a + end subroutine test_sub + +end module test_mod \ No newline at end of file -- cgit v1.2.3