forked from clawpack/clawpack
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeson.build
72 lines (63 loc) · 1.63 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
project(
'clawpack',
'c', 'fortran',
version: run_command(
find_program('python3'),
files('metadata.py'), 'version',
check: true,
).stdout().strip(),
license: 'BSD-3-Clause',
license_files: ['LICENSE'],
meson_version: '>=1.1.0',
)
fs = import('fs')
py = import('python').find_installation('python3', pure: false)
py_dep = py.dependency()
incdir_numpy = run_command(py,
['-c', 'import os; os.chdir(".."); import numpy; print(numpy.get_include())'],
check : true
).stdout().strip()
incdir_f2py = run_command(py,
['-c', 'import os; os.chdir(".."); import numpy.f2py; print(numpy.f2py.get_include())'],
check : true
).stdout().strip()
inc_np = include_directories(incdir_numpy, incdir_f2py)
f2py = [
py, '-m', 'numpy.f2py',
'--lower',
'--build-dir', '@OUTDIR@',
'@INPUT@',
'-m', # <extension-name>
]
fc = meson.get_compiler('fortran')
cc = meson.get_compiler('c')
add_project_arguments(
fc.get_supported_arguments(
'-Wno-unused-dummy-argument',
'-Wno-unused-variable',
'-Wno-unused-label',
),
language : 'fortran',
)
add_project_arguments(
# '-DNPY_NO_DEPRECATED_API=NPY_1_7_API_VERSION',
cc.get_supported_arguments(
'-Wno-unused-but-set-variable',
),
language : 'c',
)
subpackages = {
'clawutil': 'clawutil/src/python',
'pyclaw': 'pyclaw/src',
'riemann': 'riemann',
'visclaw': 'visclaw/src/python',
'petclaw': 'pyclaw/src',
'forestclaw': 'pyclaw/src',
'classic': 'classic/src/python',
'amrclaw': 'amrclaw/src/python',
'geoclaw': 'geoclaw/src/python',
}
subdir('clawpack')
foreach subpkg, subdir: subpackages
subdir(subdir / subpkg)
endforeach