Skip to content

Commit

Permalink
meson build fortran
Browse files Browse the repository at this point in the history
  • Loading branch information
scivision committed Nov 19, 2019
1 parent 608499a commit 9c69bef
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 71 deletions.
71 changes: 0 additions & 71 deletions CMakeLists.txt

This file was deleted.

31 changes: 31 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
project('lineclip', 'fortran',
version: '1.0.0',
default_options : ['default_library=static', 'buildtype=release', 'warning_level=3'])

fc = meson.get_compiler('fortran')

std18 = fc.first_supported_argument(['-std=f2018', '-stand f18', '/stand:f18'])
add_project_arguments(std18, language : 'fortran')

assert_lib = library('assert',
sources: ['assert.f90', 'error2008.f90'])

lineclip_lib = library('lineclip', 'lineclipping.f90',
link_with: [assert_lib])

lineclip_exe = executable('RunLineclip', 'DemoLineclip.f90',
link_with: [lineclip_lib, assert_lib])

test('clip', lineclip_exe, timeout: 10)

# -- coarray

coarrays = dependency('coarray', required: false, disabler: true)

CoarrayLineclip_exe = executable('CoarrayLineclip', 'DemoCoarrayLineclip.f90',
link_with: [assert_lib, lineclip_lib],
dependencies: coarrays)
cafrun = find_program('cafrun', required: false)
test('CoarrayClip', cafrun,
args: CoarrayLineclip_exe,
timeout: 10)

0 comments on commit 9c69bef

Please sign in to comment.