meson/test cases/fortran
Matthew Krupcale 45cc001a40 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.
2018-05-21 23:17:02 +03:00
..
1 basic ifort: Derive from IntelCompiler base class 2017-01-04 00:41:56 +05:30
2 modules ifort: Derive from IntelCompiler base class 2017-01-04 00:41:56 +05:30
3 module procedure Handle Fortran's MODULE PROCEDURE construct. 2014-08-08 13:35:46 +03:00
4 self dependency Handle Fortran sources with dependencies to themselves. 2014-08-08 14:29:20 +03:00
5 static Fix fortran tests without test() calls 2017-05-14 00:30:38 +03:00
6 dynamic Fix fortran tests without test() calls 2017-05-14 00:30:38 +03:00
7 generated Turn feature test into a proper unit test 2017-05-13 21:18:16 +02:00
8 module names Fix case sensitivity in Fortran module names 2017-05-26 23:21:27 +03:00
9 cpp Can use C++ and FORTRAN in a single target. Closes #2685. 2018-05-02 22:58:07 +03:00
10 find library Add support for finding libraries in Fortran projects 2018-05-21 23:17:02 +03:00