summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/fortran.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Use enum instead of `int` for compiler variantsDavid Seifert2018-09-161-7/+7
| | | | | | | | * Enums are strongly typed and make the whole `gcc_type`/`clang_type`/`icc_type` distinction redundant. * Enums also allow extending via member functions, which makes the code more generalisable.
* Remove unnecessary -lquadmath from FORTRAN flags.Jussi Pakkanen2018-09-021-1/+1
|
* find_library: Allow undefined symbols while linkingNirbheek Chauhan2018-08-221-0/+3
| | | | | Shared libraries may not always be linkable without the use of other libraries, so don't make it a linker error.
* find_library: Use _build_wrapper to get library dirsBruce Richardson2018-08-221-4/+7
| | | | | | | | | | This means that we will take into account all the flags set in the cross file when fetching the list of library dirs, which means we won't incorrectly look for 64-bit libraries when building for 32-bit. Signed-off-by: Nirbheek Chauhan <nirbheek@centricular.com> Closes https://github.com/mesonbuild/meson/issues/3881
* Convert buildtype to optimization and debug options (#3489)Jussi Pakkanen2018-08-181-7/+50
|
* Fix searching of shared libraries on OpenBSD (#3851)Nirbheek Chauhan2018-07-091-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * get_library_naming: Use templates instead of suffix/prefix pairs This commit does not change functionality, and merely sets the groundwork for a more flexibly naming implementation. * find_library: Fix manual searching on OpenBSD On OpenBSD, shared libraries are called libfoo.so.X.Y where X is the major version and Y is the minor version. We were assuming that it's libfoo.so and not finding shared libraries at all while doing manual searching, which meant we'd link statically instead. See: https://www.openbsd.org/faq/ports/specialtopics.html#SharedLibs Now we use file globbing to do searching, and pick the first one that's a real file. Closes https://github.com/mesonbuild/meson/issues/3844 * find_library: Fix priority of library search in OpenBSD Also add unit tests for the library naming function so that it's absolutely clear what the priority list of naming is. Testing is done with mocking on Linux to ensure that local testing is easy
* macos: Rewrite install_name for dependent built libraries on installNirbheek Chauhan2018-06-181-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | On macOS, we set the install_name for built libraries to @rpath/libfoo.dylib, and when linking to the library, we set the RPATH to its path in the build directory. This allows all built binaries to be run as-is from the build directory (uninstalled). However, on install, we have to strip all the RPATHs because they point to the build directory, and we change the install_name of all built libraries to the absolute path to the library. This causes the install name in binaries to be out of date. We now change that install name to point to the absolute path to each built library after installation. Fixes https://github.com/mesonbuild/meson/issues/3038 Fixes https://github.com/mesonbuild/meson/issues/3077 With this, the default workflow on macOS matches what everyone seems to do, including Autotools and CMake. The next step is providing a way for build files to override the install_name that is used after installation for use with, f.ex., private libraries when combined with the install_rpath: kwarg on targets.
* find_library: Add a cache for library searchingNirbheek Chauhan2018-06-071-1/+9
| | | | | | | | | Otherwise we can end up searching for the same library tens of times, because pkg-config does not de-duplicate -lfoo args before returning them. We use -Wl,--start-group/end-group, so we do not need to worry about ordering issues in static libraries.
* Fix issues found by flake8Xavier Claessens2018-06-061-2/+0
|
* Add support for finding libraries in Fortran projectsMatthew Krupcale2018-05-211-168/+179
| | | | | | | | * 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.
* Revert "Add macOS linker versioning information"Nirbheek Chauhan2018-05-091-2/+2
| | | | | | This reverts commit fa6ca160548d7e8df9c4c724e6c96f5e004e5316. Closes https://github.com/mesonbuild/meson/issues/3550
* Can use C++ and FORTRAN in a single target. Closes #2685.dcppJussi Pakkanen2018-05-021-1/+3
|
* Add an OpenMP dependency.Elliott Sales de Andrade2018-04-171-0/+19
| | | | | This works similarly to the thread dependency which stores the various inconsistent flags in each compiler.
* Add macOS linker versioning informationTom Schoonjans2018-04-161-2/+2
| | | | | | This patch exploits the information residing in ltversion to set the -compatibility_version and -current_version flags that are passed to the linker on macOS.
* Added Elbrus lcc compilers support as inheritance from gcc onesmakise-homura2018-03-191-0/+7
|
* Use os.path: basename() and dirname() instead of split()Aleksey Filippov2018-01-301-1/+1
| | | | | | | | | | | | According to Python documentation[1] dirname and basename are defined as follows: os.path.dirname() = os.path.split()[0] os.path.basename() = os.path.split()[1] For the purpose of better readability split() is replaced by appropriate function if only one part of returned tuple is used. [1]: https://docs.python.org/3/library/os.path.html#os.path.split
* Merge pull request #2791 from behlec/compiler-versionJussi Pakkanen2017-12-201-18/+18
|\ | | | | Add more version information to compiler
| * More version information for Fortran.Christoph Behle2017-12-161-18/+18
| |
* | Use -MD instead of -MMD for reliability.Jussi Pakkanen2017-12-181-1/+1
|/
* gfortran: Add coverage argumentsNirbheek Chauhan2017-08-151-0/+6
|
* Add info on module include flag for Fortran compilers.Elliott Sales de Andrade2017-08-041-0/+9
|
* Add build_rpath as new property allowing people to specify rpath entries ↵Jussi Pakkanen2017-07-211-2/+2
| | | | that are used in the build tree but will be removed on install.
* Split out languages from compilers.pyAlistair Thomas2017-06-231-0/+289