diff options
author | Matthew Krupcale <mkrupcale@matthewkrupcale.com> | 2018-04-24 01:06:49 -0400 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-05-21 23:17:02 +0300 |
commit | 45cc001a40ff52254a0bd27718149dce8cebe73d (patch) | |
tree | d2619f359c7ba255138ef2ea6e08a09452b2eb8b /docs/markdown/External-commands.md | |
parent | cf5fe1d4401505ac808b1b018a21dbcc30cfc9f5 (diff) | |
download | meson-45cc001a40ff52254a0bd27718149dce8cebe73d.zip meson-45cc001a40ff52254a0bd27718149dce8cebe73d.tar.gz meson-45cc001a40ff52254a0bd27718149dce8cebe73d.tar.bz2 |
Add support for finding libraries in Fortran projects
* mesonbuild/compilers/c.py: Make the `find_library` method more generic by allowing the user to supply the `code` for compiling and linking.
* mesonbuild/compilers/fortran.py: Use the methods inherited from `Compiler` base class where appropriate. Also reuse `CComiler` methods where applicable. This should be sufficient to get various compiler/linker arguments as well as to compile and link Fortran programs. This was tested with `gfortran` compiler, and while the other compilers ought to work for simple cases, their methods are primarily inherited from the base `FortranCompiler` class.
* test cases/fortran/10 find library/gzip.f90: Fortran module with some basic Fortran wrapper interfaces to `gzopen`, `gzwrite`, and `gzclose` C `zlib` functions.
* test cases/fortran/10 find library/main.f90: Fortran program using the `gzip` Fortran interface module to write some data to a gzip file.
* test cases/fortran/10 find library/meson.build: Meson build file for this test case. This demonstrates the ability to link the Fortran program against an external library.
Diffstat (limited to 'docs/markdown/External-commands.md')
0 files changed, 0 insertions, 0 deletions