forked from glinscott/leela-chess
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
71 lines (59 loc) · 2.07 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
project('lc0', 'cpp')
# default_options : ['cpp_std=c++17'])
add_global_arguments('-std=c++17', language : 'cpp')
cc = meson.get_compiler('cpp')
# Installed from https://github.com/FloopCZ/tensorflow_cc
tensorflow_cc = declare_dependency(
include_directories: include_directories(
'/usr/local/include/tensorflow',
'/usr/local/include/tensorflow/bazel-genfiles',
'/usr/local/include/tensorflow/tensorflow/contrib/makefile/downloads',
'/usr/local/include/tensorflow/tensorflow/contrib/makefile/downloads/eigen',
'/usr/local/include/tensorflow/tensorflow/contrib/makefile/downloads/gemmlowp',
'/usr/local/include/tensorflow/tensorflow/contrib/makefile/downloads/nsync/public',
'/usr/local/include/tensorflow/tensorflow/contrib/makefile/gen/protobuf-host/include',
),
dependencies: [
cc.find_library('libtensorflow_cc', dirs: '/usr/local/lib/tensorflow_cc/'),
cc.find_library('dl'),
cc.find_library('pthread'),
cc.find_library('libprotobuf', dirs: '/usr/local/lib/tensorflow_cc/'),
],
)
deps = []
deps += tensorflow_cc
deps += cc.find_library('stdc++fs')
# deps += dependency('libprofiler')
files = [
'src/chess/bitboard.cc',
'src/chess/board.cc',
'src/neural/loader.cc',
'src/neural/network_tf.cc',
'src/neural/network_random.cc',
'src/neural/cache.cc',
'src/mcts/search.cc',
'src/mcts/node.cc',
'src/engine.cc',
'src/uciloop.cc',
'src/ucioptions.cc',
'src/utils/transpose.cc',
]
includes = []
includes += include_directories('src')
executable('lc0', 'src/main.cc',
files, include_directories: includes, dependencies: deps)
### Tests
test_deps = deps
test_deps += dependency('gtest')
test('ChessBoard',
executable('chessboard_test', 'src/chess/board_test.cc',
files, include_directories: includes, dependencies: test_deps
))
test('Network',
executable('network_test', 'src/neural/network_test.cc',
files, include_directories: includes, dependencies: test_deps
))
test('HashCat',
executable('hashcat_test', 'src/utils/hashcat_test.cc',
files, include_directories: includes, dependencies: test_deps
))