forked from scipy/scipy
-
Notifications
You must be signed in to change notification settings - Fork 2
/
meson.build
44 lines (39 loc) · 1.49 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
project(
'SciPy',
'c', 'cpp',
# Note that the git commit hash cannot be added dynamically here (it is added
# in the dynamically generated and installed `scipy/version.py` though - see
# tools/version_utils.py
version: '1.9.0.dev0',
license: 'BSD-3',
meson_version: '>= 0.60',
default_options: [
'buildtype=debugoptimized',
'c_std=c99',
'cpp_std=c++14', # TODO: use c++11 if 14 is not available
# TODO: the below -Wno flags are all needed to silence warnings in
# f2py-generated code. This should be fixed in f2py itself.
'c_args=-Wno-unused-function -Wno-conversion -Wno-misleading-indentation -Wno-incompatible-pointer-types',
'fortran_args=-Wno-conversion',
'fortran_std=legacy',
],
)
cc = meson.get_compiler('c')
cpp = meson.get_compiler('cpp')
# This argument is called -Wno-unused-but-set-variable by GCC, however Clang
# doesn't recognize that.
if cc.has_argument('-Wno-unused-but-set-variable')
add_global_arguments('-Wno-unused-but-set-variable', language : 'c')
endif
# Adding at project level causes many spurious -lgfortran flags.
add_languages('fortran', native: false)
cython = find_program('cython')
pythran = find_program('pythran')
generate_f2pymod = files('tools/generate_f2pymod.py')
tempita = files('scipy/_build_utils/tempita.py')
copier = find_program(['cp', 'scipy/_build_utils/copyfiles.py'])
# https://mesonbuild.com/Python-module.html
py_mod = import('python')
py3 = py_mod.find_installation()
py3_dep = py3.dependency()
subdir('scipy')