diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2016-12-19 19:34:29 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2016-12-20 22:46:36 +0200 |
commit | 98c4fd2d5d2a28f3a4d80f91564aef5e443a22a6 (patch) | |
tree | 011bbaed7027f4c564d3979c1801f2631f53da30 | |
parent | 415990f1bafbc35662620e56e58830dbade6d4eb (diff) | |
download | meson-98c4fd2d5d2a28f3a4d80f91564aef5e443a22a6.zip meson-98c4fd2d5d2a28f3a4d80f91564aef5e443a22a6.tar.gz meson-98c4fd2d5d2a28f3a4d80f91564aef5e443a22a6.tar.bz2 |
Add per target argument for Fortran.
-rw-r--r-- | mesonbuild/build.py | 5 | ||||
-rw-r--r-- | test cases/fortran/1 basic/meson.build | 5 |
2 files changed, 9 insertions, 1 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index a9f10c5..87797e1 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -28,6 +28,7 @@ known_basic_kwargs = {'install' : True, 'cpp_args' : True, 'cs_args' : True, 'vala_args' : True, + 'fortran_args' : True, 'd_args' : True, 'java_args' : True, 'link_args' : True, @@ -542,6 +543,10 @@ class BuildTarget(): if not isinstance(valalist, list): valalist = [valalist] self.add_compiler_args('vala', valalist) + fortranlist = kwargs.get('fortran_args', []) + if not isinstance(fortranlist, list): + fortranlist = [fortranlist] + self.add_compiler_args('fortran', fortranlist) if not isinstance(self, Executable): self.vala_header = kwargs.get('vala_header', self.name + '.h') self.vala_vapi = kwargs.get('vala_vapi', self.name + '.vapi') diff --git a/test cases/fortran/1 basic/meson.build b/test cases/fortran/1 basic/meson.build index 78f40b5..9c40951 100644 --- a/test cases/fortran/1 basic/meson.build +++ b/test cases/fortran/1 basic/meson.build @@ -1,4 +1,7 @@ project('simple fortran', 'fortran') -e = executable('simple', 'simple.f95') +add_global_arguments('-fbounds-check', language : 'fortran') + +e = executable('simple', 'simple.f95', + fortran_args : '-ffree-form') test('Simple Fortran', e) |