Commit Graph

77 Commits

Author SHA1 Message Date
Dylan Baker 23d2311d12 tests/fortran/9 cpp: It's okay to link ICL and ifort
This test currently assumes that the fortran compiler is gfotran, and
if we're not using g++ it skips. This patch changes it to skip if the
fotran compiler and the c++ compiler aren't the same family. This still
may skip in some cases it shouldn't (clang and gfort probably work fine
on windows), but it does enable ifort + ICL. Which is hte point.
2019-05-10 13:36:35 -07:00
Dylan Baker 0dc88487dd tests/fortran/1: call compiler.get_id() == str instead of compiler == str 2019-05-10 13:36:35 -07:00
Michael Hirsch, Ph.D 06bfc2dab6 per-target manual specification of link_language 2019-05-02 23:26:51 +03:00
Michael Hirsch, Ph.D 6e06ad1c1f add test case for same-name module+submodule 2019-03-25 21:19:38 -04:00
Michael Hirsch, Ph.D 972857fc1d
add fortran include test case 2019-03-14 01:54:22 -04:00
Michael Hirsch, Ph.D 39e6dc5885 correct Fortran self-dep logic
corrected, generalized self-referential Fortran fix

further refine logic
2019-02-27 14:08:08 +02:00
Michael Hirsch, Ph.D 32a344b949 Fortran: handle self-referential files 2019-02-26 19:16:50 +02:00
Michael Hirsch, Ph.D ebfb09f5d6 Fortran 2008/2018 Coarray support 2019-02-13 21:09:18 +02:00
Michael Hirsch, Ph.D 70e6f4198c Fortran 2008 submodule (#4874) 2019-02-05 22:41:44 +01:00
Michael Hirsch, Ph.D cccffaa29d BUGFIX: allow fc.run(code) to work, pick only Fortran module 2019-01-29 23:25:23 +02:00
Jussi Pakkanen 3997649139 Disable mixed (mscv/clang + gnu) Windows Fortran tests. Closes #4829. 2019-01-28 22:15:02 +02:00
Michael Hirsch, Ph.D 8636f31d9c BUGFIX: broken/missing Fortran code/unit tests 2019-01-27 20:57:21 +02:00
Dylan Baker 64107f5fe1 tests: Fix fortran + cpp test for ifort
To make ifort like rand we need to link with ifport, or we don't get
rand.
2018-11-15 18:42:25 -08:00
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
Jussi Pakkanen a2fdaa9ea0 Can use C++ and FORTRAN in a single target. Closes #2685. 2018-05-02 22:58:07 +03:00
Bálint Aradi 809a5938ff Fix case sensitivity in Fortran module names 2017-05-26 23:21:27 +03:00
Bálint Aradi 1472f419ea Fix fortran tests without test() calls 2017-05-14 00:30:38 +03:00
Bálint Aradi 3d88ce70f4 Turn feature test into a proper unit test 2017-05-13 21:18:16 +02:00
Bálint Aradi 37ce7f01cf Add test for fortran dependency scanning fix 2017-05-12 15:36:38 +02:00
Nirbheek Chauhan 2589009d23 ifort: Derive from IntelCompiler base class
And fix the list of supported file suffixes, and use .f90 for all
fortran tests since ifort, the Intel Fortran compiler ignores files
ending with .f95, .f03, and .f08
2017-01-04 00:41:56 +05:30
Jussi Pakkanen 98c4fd2d5d Add per target argument for Fortran. 2016-12-20 22:46:36 +02:00
Marko Raatikainen 28f60ca474 Fix shared libraries for fortran 2015-08-31 20:20:11 +03:00
Jussi Pakkanen 5467b7d58b Made Fortran static libraries work. Closes #237. 2015-08-23 20:17:37 +03:00
Jussi Pakkanen 1b830c907f Handle Fortran sources with dependencies to themselves. 2014-08-08 14:29:20 +03:00
Jussi Pakkanen f3d0778403 Handle Fortran's MODULE PROCEDURE construct. 2014-08-08 13:35:46 +03:00
Jussi Pakkanen 5303b1d0f4 Scan Fortran dependencies, but it fails currently due to a deficiency in Ninja. 2014-08-03 20:37:03 +03:00
Jussi Pakkanen a77551f3d7 Basic Fortran support. 2014-08-01 16:25:29 +03:00