aboutsummaryrefslogtreecommitdiff
path: root/example_packages
diff options
context:
space:
mode:
authorSebastian Ehlert <28669218+awvwgk@users.noreply.github.com>2020-12-09 09:42:25 +0100
committerSebastian Ehlert <28669218+awvwgk@users.noreply.github.com>2020-12-10 18:14:23 +0100
commit4eeab74dd007d9476f3b862f79c623e457a7dad1 (patch)
tree0d2f6438044a8ec264ae97a4ca82430a905866aa /example_packages
parent50723700d253c83e4b68930370c3b0819e529be3 (diff)
downloadfpm-4eeab74dd007d9476f3b862f79c623e457a7dad1.tar.gz
fpm-4eeab74dd007d9476f3b862f79c623e457a7dad1.zip
Implement example applications in Fortran fpm
Diffstat (limited to 'example_packages')
-rw-r--r--example_packages/README.md1
-rw-r--r--example_packages/with_examples/.gitignore1
-rw-r--r--example_packages/with_examples/demo/prog.f903
-rw-r--r--example_packages/with_examples/fpm.toml7
4 files changed, 12 insertions, 0 deletions
diff --git a/example_packages/README.md b/example_packages/README.md
index 0eb0653..a360225 100644
--- a/example_packages/README.md
+++ b/example_packages/README.md
@@ -13,6 +13,7 @@ the features demonstrated in each package and which versions of fpm are supporte
| hello_complex_2 | Auto-discovery of tests and executables with modules | N | Y |
| hello_fpm | App-only; local path dependency | Y | Y |
| hello_world | App-only | Y | Y |
+| with_examples | Example-only | N | Y |
| makefile_complex | External build command (makefile); local path dependency | Y | N |
| program_with_module | App-only; module+program in single source file | Y | Y |
| submodules | Lib-only; submodules (3 levels) | N | Y |
diff --git a/example_packages/with_examples/.gitignore b/example_packages/with_examples/.gitignore
new file mode 100644
index 0000000..d9b4f01
--- /dev/null
+++ b/example_packages/with_examples/.gitignore
@@ -0,0 +1 @@
+/build/*
diff --git a/example_packages/with_examples/demo/prog.f90 b/example_packages/with_examples/demo/prog.f90
new file mode 100644
index 0000000..8b3d882
--- /dev/null
+++ b/example_packages/with_examples/demo/prog.f90
@@ -0,0 +1,3 @@
+program demo
+ write(*, '(a)') "This is a simple demo program, but not a real application"
+end program demo
diff --git a/example_packages/with_examples/fpm.toml b/example_packages/with_examples/fpm.toml
new file mode 100644
index 0000000..d7d2926
--- /dev/null
+++ b/example_packages/with_examples/fpm.toml
@@ -0,0 +1,7 @@
+name = "with_examples"
+build.auto-examples = false
+
+[[example]]
+name = "demo-prog"
+source-dir = "demo"
+main = "prog.f90"