-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
58 lines (47 loc) · 1.57 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
project('ising_graph', 'cpp',
version : '1.0',
license : [ 'proprietary'],
meson_version : '>= 0.40.1',
default_options : [ 'warning_level=3', 'buildtype=debugoptimized', 'cpp_std=c++17' ]
)
# Variables tracking sources and libraries
library_path = []
project_sources = []
project_header_files = []
project_test_sources = []
project_benchmark_sources = []
inc = [include_directories('include')]
subdir('include')
# This is where you should add in include directories
subdir('src')
ising_graph_deps = [
]
ising_graph_dep_libs = [
]
test_bin = executable('measure-lattice',
main_source,
include_directories : inc,
dependencies : ising_graph_deps,
link_with : ising_graph_dep_libs)
if get_option('enable-tests')
subdir('tests')
endif
if get_option('enable-benchmarks')
subdir('benchmarks')
endif
subdir('docs')
# This adds the clang format file to the build directory
configure_file(input : '.clang-format',
output : '.clang-format',
configuration : configuration_data())
run_target('format',
command : ['clang-format','-i','-style=file',project_sources,project_test_sources,project_benchmark_sources,project_header_files])
# This regex excludes any sources from the third_party, tests, benchmarks
# and gtest related files.
regex = '^((?!(third_party|tests|benchmarks|gtest)).)*$'
# This adds clang tidy support
configure_file(input : '.clang-tidy',
output : '.clang-tidy',
configuration : configuration_data())
run_target('tidy',
command : ['run-clang-tidy','-fix', '-j' , '8', 'files', regex ,'-format', '-p='+ meson.build_root()])