|
| 1 | +project('lineclip', 'fortran', |
| 2 | + version: '1.0.0', |
| 3 | + default_options : ['default_library=static', 'buildtype=release', 'warning_level=3']) |
| 4 | + |
| 5 | +fc = meson.get_compiler('fortran') |
| 6 | + |
| 7 | +std18 = fc.first_supported_argument(['-std=f2018', '-stand f18', '/stand:f18']) |
| 8 | +add_project_arguments(std18, language : 'fortran') |
| 9 | + |
| 10 | +assert_lib = library('assert', |
| 11 | + sources: ['assert.f90', 'error2008.f90']) |
| 12 | + |
| 13 | +lineclip_lib = library('lineclip', 'lineclipping.f90', |
| 14 | + link_with: [assert_lib]) |
| 15 | + |
| 16 | +lineclip_exe = executable('RunLineclip', 'DemoLineclip.f90', |
| 17 | + link_with: [lineclip_lib, assert_lib]) |
| 18 | + |
| 19 | +test('clip', lineclip_exe, timeout: 10) |
| 20 | + |
| 21 | +# -- coarray |
| 22 | + |
| 23 | +coarrays = dependency('coarray', required: false, disabler: true) |
| 24 | + |
| 25 | +CoarrayLineclip_exe = executable('CoarrayLineclip', 'DemoCoarrayLineclip.f90', |
| 26 | + link_with: [assert_lib, lineclip_lib], |
| 27 | + dependencies: coarrays) |
| 28 | +cafrun = find_program('cafrun', required: false) |
| 29 | +test('CoarrayClip', cafrun, |
| 30 | + args: CoarrayLineclip_exe, |
| 31 | + timeout: 10) |
0 commit comments