File: meson.build

package info (click to toggle)
bitwuzla 0.8.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 43,292 kB
  • sloc: cpp: 94,870; python: 3,254; ansic: 1,613; sh: 50; makefile: 10
file content (162 lines) | stat: -rw-r--r-- 2,745 bytes parent folder | download
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# Names of unit tests without test_ prefix and .cpp suffix
unit_tests = [
  ['api',
    [
      'api',
      'capi'
    ]
  ],

  ['backtrack',
    [
      'assertion_stack',
      'object',
      'unordered_map',
      'unordered_set',
      'vector'
    ]
  ],

  ['node',
    [
      'node',
      'node_manager',
      'node_utils'
    ]
  ],

  ['option',
    [
      'options'
    ]
  ],

  ['parser',
    [
      'btor2_lexer',
      'smt2_lexer',
      'smt2_symbol_table',
    ]
  ],
  ['preprocess',
    [
      'assertion_tracker',
      'pass_contradicting_ands',
      'pass_normalize',
      'pass_flatten_and',
      'pass_variable_substitution',
      'preprocessor',
    ]
  ],

  ['printer',
    [
      'printer'
    ]
  ],

  ['rewrite',
    [
      'rewriter_core',
      'rewriter_utils',
      'rewriter_bool',
      'rewriter_bv',
      'rewriter_bv_norm',
      'rewriter_bv_overflow',
      'rewriter_bv_rotate',
      'rewriter_fp',
    ]
  ],

  ['solver',
    [
      'fun_solver',
      'incremental',
      'bv_solver',
      'bv_prop_solver',
      'fp_solver',
      'fp_floating_point',
    ]
  ],

  ['type',
    [
      'type_manager'
    ]
  ],

  ['lib/bitblast',
    [
      'aig_bitblaster',
      'aig_manager',
      'aig_cnf'
    ]
  ],

  ['lib/bitvector',
    [
      'bv',
      'bvdomain',
      'bvdomaingen',
    ]
  ],

  ['lib/ls/bv',
    [
      'bvnode',
      'bvnodecons',
      'bvnodeinv',
      'bvnodeiscons',
      'bvnodeisess',
      'bvnodeisinv',
      'bvnodeselpath',
      'local_search_bv',
      ]
  ],

  ['util',
    [
      'integer',
    ]
  ],

]

gtest_dep = dependency('gtest_main', required: true)
test_inc = [include_directories('../../src', '../..', 'lib')]
test_deps = [gtest_dep, bitwuzla_dep, gmp_dep]

# Disable wine debug output if we run the cross-compiled binary
env = []
if meson.is_cross_build() and host_machine.system() == 'windows'
  env += ['WINEDEBUG=fixme-all']
endif

cpp_args = ['-fno-access-control', '-DBZLA_ENABLE_UNIT_TESTING']
if cms_dep.found()
  cpp_args += ['-DBZLA_USE_CMS']
endif
if kissat_dep.found()
  cpp_args += ['-DBZLA_USE_KISSAT']
endif
if get_option('fpexp')
  cpp_args += ['-DBZLA_USE_FPEXP']
endif

# Add unit tests
foreach p : unit_tests
  test_subdir = p[0]
  suite = test_subdir.replace('/', '_')
  foreach name : p[1]
    basename = ''.join('test_', name, '.cpp')
    src = join_paths(test_subdir, basename)
    name = '_'.join(suite, name)
    exename = ''.join('test_', name)

    exe = executable(exename, src,
               dependencies: test_deps,
               include_directories: test_inc,
               cpp_args: cpp_args)
    test(name, exe, suite: ['unit', suite], timeout: 0, env: env)
  endforeach
endforeach