-
Notifications
You must be signed in to change notification settings - Fork 11
/
meson.build.tmp
103 lines (85 loc) · 2.7 KB
/
meson.build.tmp
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# meson compile -C build
# https://github.com/vislearn/libct/blob/main/meson.build
# https://fuchsia.googlesource.com/third_party/dtc/+/refs/heads/upstream/coverity_scan/meson.build
project('oapackage', ['c', 'cpp'], version: '0.1.0', default_options: ['cpp_std=c++11'])
pymod = import('python')
python3 = pymod.find_installation('python')
#message(python3)
#gurobi = dependency('gurobi_c++', fallback: ['gurobi-finder', 'gurobi'])
swig = find_program('swig', required: true)
#message(swig)
cc = meson.get_compiler('c')
swig_include_dir = meson.source_root() / 'src'
include_dir = include_directories(['src', 'src/nauty'])
nautyheaders = ['src\\nauty\\gtools.h',
'src\\nauty\\naugroup.h',
'src\\nauty\\nautinv.h',
'src\\nauty\\naurng.h',
'src\\nauty\\naugraph.h',
'src\\nauty\\nausparse.h',
'src\\nauty\\nautil.h',
'src\\nauty\\nauty.h',
'src\\nauty\\schreier.h']
sources = ['src/arraytools.cpp',
'src/arrayproperties.cpp',
'src/pareto.cpp',
'src/nonroot.cpp',
'src/mathtools.cpp',
'src/oaoptions.cpp',
'src/tools.cpp',
'src/md5.cpp',
'src/strength.cpp',
'src/graphtools.cpp',
'src/conference.cpp',
'src/unittests.cpp',
'src/Deff.cpp',
'src/evenodd.cpp',
'src/lmc.cpp',
'src/extend.cpp',
'src/bitarray/bit_array.cpp',
'src/nauty/nauty.c',
'src/nauty/nautinv.c',
'src/nauty/nautil.c',
'src/nauty/naurng.c',
'src/nauty/naugraph.c',
'src/nauty/schreier.c',
'src/nauty/naugroup.c']
oapackage_static = static_library(
'oapackage', sources,
include_directories: include_dir,
# dependencies: [gurobi],
install: false)
#libct_shared = shared_library(
# 'ct', 'lib/ct.cpp',
# include_directories: include_dir,
# version: meson.project_version(),
# soversion: '0',
# dependencies: [gurobi],
# install: true)
oapackage_py = custom_target('oapackage_py',
input: ['oalib.i'],
output: ['oalib_wrap.py'],
command: [swig, '-python', '-c++', '-doxygen', '-w503,401,362,302,389,446,509,305', '-Isrc/',
'-I@0@'.format(swig_include_dir), '-o', '@OUTPUT@', '@INPUT0@','-DSWIGCODE', '-DFULLPACKAGE'])
python3.extension_module('oapackage',
sources: [oapackage_py],
include_directories: include_dir,
link_with: [oapackage_static],
dependencies: [python3.dependency()],
install: true,
install_dir: python3.get_install_dir(pure: false, subdir: '.'))
#python3.install_sources([
# 'python/ct/__init__.py',
# 'python/ct/gurobi.py',
# 'python/ct/model.py',
# 'python/ct/primals.py',
# 'python/ct/rounding.py',
# 'python/ct/tracker.py',
# 'python/ct/txt.py',
# 'python/ct/utils.py'
# ], pure: true, subdir: 'ct')
#install_data(['bin/ct'],
# install_dir: get_option('bindir'),
# install_mode: 'rwxr-xr-x')
#install_headers('include/ct.h')
# vim: set ts=8 sts=2 sw=2 et: