-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathmeson.build
More file actions
48 lines (40 loc) · 1.16 KB
/
meson.build
File metadata and controls
48 lines (40 loc) · 1.16 KB
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
project(
'uarray',
'cpp',
version: run_command(['tools/gitversion.py'], check: true).stdout().strip(),
license: 'BSD-3-Clause',
license_files: ['LICENSE'],
default_options: 'cpp_std=c++17',
)
fs = import('fs')
py = import('python').find_installation(pure: false)
# Sources variable definitions #
# NOTE: downstream projects may rely on these variable names when vendoring,
# do not change them without consulting with downstream projects
python_sources = {
'uarray': files(
'src/uarray/__init__.py',
'src/uarray/_backend.py',
'src/uarray/_typing.pyi',
'src/uarray/_typing.pyi',
'src/uarray/_version.pyi',
)
}
if fs.exists('src/uarray/_version.py')
python_sources = python_sources + {
'uarray': python_sources['uarray'] + files('src/uarray/_version.py')
}
endif
cpp_sources = files('src/_uarray_dispatch.cxx')
include_dirs = include_directories('src')
# Installation
if not meson.is_subproject()
py.extension_module('_uarray',
cpp_sources,
cpp_args: meson.get_compiler('cpp').get_supported_arguments('-Wno-terminate'),
include_directories: include_dirs,
install: true,
subdir: 'uarray',
)
endif
subdir('src/uarray')