-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathmeson.build
More file actions
59 lines (45 loc) · 1.87 KB
/
meson.build
File metadata and controls
59 lines (45 loc) · 1.87 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
49
50
51
52
53
54
55
56
57
58
59
project('pele',
['c', 'cpp', 'fortran', 'cython'],
version : '0.1.1',
meson_version: '>= 1.1.0',
default_options : ['warning_level=1', 'buildtype=release'])
fc = meson.get_compiler('fortran')
py = import('python').find_installation(pure: false)
py_dep = py.dependency()
pydir = py.get_install_dir()
incdir_numpy = run_command(py,
['-c', 'import numpy; print(numpy.get_include())'],
check : true
).stdout().strip()
incdir_f2py = run_command(py,
['-c', 'import numpy.f2py; print(numpy.f2py.get_include())'],
check : true
).stdout().strip()
fortranobject_c = incdir_f2py / 'fortranobject.c'
inc_np = include_directories(incdir_numpy, incdir_f2py)
np_dep = declare_dependency(include_directories: inc_np)
incdir_pele = run_command(py,
['-c', 'import pele; print(pele.get_include())'],
check : true
).stdout().strip()
inc_pele = include_directories(incdir_pele)
pele_dep = declare_dependency(include_directories: inc_pele)
cython_args = ['-Xembedsignature=True','-3']
cython_compile_dep = declare_dependency(compile_args: ['-Wall', '-Wextra', '-pedantic', '-funroll-loops', '-O3'])
pyuic = find_program('pyuic5')
pyrcc = find_program('pyrcc5')
if get_option('lammps').enabled()
lammpsdir = run_command(
py, ['-c', 'import pathlib, lammps; print(pathlib.Path(lammps.__file__).parent)'], check : true
).stdout().strip()
cpp = meson.get_compiler('cpp')
lammps_lib = cpp.find_library('lammps', dirs : lammpsdir, required: true)
mpi_dep = dependency('mpi', required: true, language: 'cpp')
incdir_lammps = run_command(
py, ['-c', 'import pele; print(pele.get_lammps_include())'], check : true
).stdout().strip()
inc_lammps = include_directories([incdir_lammps, incdir_pele/'lammps'])
lammps_dep = declare_dependency(include_directories: inc_lammps)
lammps_rpath = py.get_path('purelib')/'lammps'
endif
subdir('pele')