diff options
author | Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> | 2020-11-08 12:13:53 +0100 |
---|---|---|
committer | Sebastian Ehlert <28669218+awvwgk@users.noreply.github.com> | 2020-11-13 09:11:17 +0100 |
commit | 581ec60b57d21dba846f0c34648f8968ad1bd7fc (patch) | |
tree | 203bce060c8a7f43b25ad2adeadd68f36daf0a6b /manifest-reference.md | |
parent | b1fddf3a0e81d5edb65f25412be1c3e4e0539d58 (diff) | |
download | fpm-581ec60b57d21dba846f0c34648f8968ad1bd7fc.tar.gz fpm-581ec60b57d21dba846f0c34648f8968ad1bd7fc.zip |
Add specification for build.link in manifest reference
Diffstat (limited to 'manifest-reference.md')
-rw-r--r-- | manifest-reference.md | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/manifest-reference.md b/manifest-reference.md index 5f0227a..f97136a 100644 --- a/manifest-reference.md +++ b/manifest-reference.md @@ -29,6 +29,8 @@ Every manifest file consists of the following sections: Toggle automatic discovery of test executables - [*auto-executables*](#automatic-target-discovery): Toggle automatic discovery of executables + - [*link*](#link-external-libraries): + Link with external dependencies - Target sections: - [*library*](#library-configuration) Configuration of the library target @@ -282,6 +284,32 @@ helloff = { git = "https://gitlab.com/everythingfunctional/helloff.git" } ``` +## Link external libraries + +> Supported in Fortran fpm only + +To declare link time dependencies on external libraries a list of native libraries can be specified in the *link* entry. +Specify either one library as string or a list of strings in case several libraries should be linked. +When possible the project should only link one native library. +The list of library dependencies is exported to dependent packages. + +*Example:* + +To link against the zlib compression library use + +```toml +link = "z" +``` + +To dependent on LAPACK also BLAS should be linked. +In this case the order of the libraries matters: + +```toml +[build] +link = ["blas", "lapack"] +``` + + ## Automatic target discovery > Supported in Fortran fpm only |