Skip to content

Add library-dir to support -Lpath - #671

Closed
zoziha wants to merge 1 commit into
fortran-lang:mainfrom
zoziha:add_lpath
Closed

Add library-dir to support -Lpath#671
zoziha wants to merge 1 commit into
fortran-lang:mainfrom
zoziha:add_lpath

Conversation

@zoziha

@zoziha zoziha commented Mar 9, 2022

Copy link
Copy Markdown
Contributor
  • Add library-dir in fpm.toml to support -Lpath;
  • Use the compiled minpack as a demo of this new feature;
  • Update tests.

Description

-Lpath makes it possible to distribute large libraries such as stdlib, OpenBLAS, HDF5, MKL, etc., and to package compiled .mod and .a/.dll/.so/.dll.a files into fpm distribution.

Comment thread src/fpm/manifest.f90

self%source_dir = "src"
self%include_dir = [string_t("include")]
self%library_dir = [string_t("lib")]

@zoziha zoziha Mar 9, 2022

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

library-dir defaults to lib.

Comment on lines +1 to +9
name = "minpack"

[library]
include-dir = ["inc"]
library-dir = ["src"]

[build]
link = "minpack"
external-modules = ["minpack_module"]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These four features allow fpm to distribute binary link libraries, like minpack.

@zoziha

zoziha commented May 27, 2022

Copy link
Copy Markdown
Contributor Author

Rethinking the value of this PR, it seems that this feature does not need to be implemented. :\

Currently, we can mostly set the system or temporary FPM_FFLAGS environment variable to support -Ipath/to/include and -Lpath/to/lib.

I will close this PR tomorrow.

@zoziha zoziha closed this May 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add -Lpath to support compiled native packages, and distribute compiled binary fpm packages

1 participant