/
meson.build
53 lines (47 loc) · 1.35 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
pocketfft_threads = []
fft_deps = []
if is_windows
if is_mingw
# mingw-w64 does not implement pthread_pfork, needed by pocket_fft
# Disable threading completely, because of freezes using threading for
# mingw-w64 gcc: https://github.com/mreineck/pocketfft/issues/1
pocketfft_threads += ['-DPOCKETFFT_NO_MULTITHREADING']
else
if thread_dep.found()
# Use native Windows threading for MSVC/Clang. `pthreads` is probably not
# installed, and native threading is always available. It is not easy to
# distinguish this better, Meson builtin functionality for that is in
# progress (see comment on gh-16957). The code in `pocketfft_hdronly.h`
# will include `<threads>` anyway.
fft_deps += [thread_dep]
pocketfft_threads += []
endif
endif
else
if thread_dep.found()
fft_deps += [thread_dep]
pocketfft_threads += ['-DPOCKETFFT_PTHREADS']
endif
endif
py3.extension_module('pypocketfft',
'pypocketfft.cxx',
cpp_args: pocketfft_threads,
include_directories: inc_pybind11,
dependencies: fft_deps,
link_args: version_link_args,
install: true,
subdir: 'scipy/fft/_pocketfft',
)
python_sources = [
'__init__.py',
'basic.py',
'helper.py',
'LICENSE.md',
'realtransforms.py'
]
py3.install_sources(
python_sources,
pure: false,
subdir: 'scipy/fft/_pocketfft'
)
subdir('tests')