aboutsummaryrefslogtreecommitdiff
path: root/example_packages/link_executable
diff options
context:
space:
mode:
authorSebastian Ehlert <28669218+awvwgk@users.noreply.github.com>2020-11-14 15:52:02 +0100
committerGitHub <noreply@github.com>2020-11-14 15:52:02 +0100
commit93cc44017e413a32188fed34dd60d4b710ad5ac3 (patch)
treeb136962c5f5de1543c450ac4e0954504fd5e0804 /example_packages/link_executable
parentb1fddf3a0e81d5edb65f25412be1c3e4e0539d58 (diff)
parentfcc971fd8703c37b8e0e02dabfe95138b4979309 (diff)
downloadfpm-93cc44017e413a32188fed34dd60d4b710ad5ac3.tar.gz
fpm-93cc44017e413a32188fed34dd60d4b710ad5ac3.zip
Merge pull request https://github.com/fortran-lang/fpm/pull/233 from awvwgk/link
Allow linking against external libraries
Diffstat (limited to 'example_packages/link_executable')
-rw-r--r--example_packages/link_executable/.gitignore1
-rw-r--r--example_packages/link_executable/app/main.f9011
-rw-r--r--example_packages/link_executable/fpm.toml8
3 files changed, 20 insertions, 0 deletions
diff --git a/example_packages/link_executable/.gitignore b/example_packages/link_executable/.gitignore
new file mode 100644
index 0000000..a007fea
--- /dev/null
+++ b/example_packages/link_executable/.gitignore
@@ -0,0 +1 @@
+build/*
diff --git a/example_packages/link_executable/app/main.f90 b/example_packages/link_executable/app/main.f90
new file mode 100644
index 0000000..b1df402
--- /dev/null
+++ b/example_packages/link_executable/app/main.f90
@@ -0,0 +1,11 @@
+program gomp_example
+ implicit none
+
+ interface
+ integer function omp_get_num_procs()
+ end function
+ end interface
+
+ print *, omp_get_num_procs()
+
+end program gomp_example
diff --git a/example_packages/link_executable/fpm.toml b/example_packages/link_executable/fpm.toml
new file mode 100644
index 0000000..f3545ca
--- /dev/null
+++ b/example_packages/link_executable/fpm.toml
@@ -0,0 +1,8 @@
+name = "link_executable"
+build.auto-executables = false
+
+[[executable]]
+name = "gomp_test"
+source-dir = "app"
+main = "main.f90"
+link = ["gomp"]