-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
31 lines (27 loc) · 870 Bytes
/
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
# Define project settings
project('meson-sqlite', 'cpp',
version : '0.1.0',
default_options : ['warning_level=3',
'cpp_std=c++14'])
# Set up dependencies
sqlite_dep = dependency('sqlite3', required : false)
if not sqlite_dep.found()
sqlite_proj = subproject('sqlite')
sqlite_dep = sqlite_proj.get_variable('sqlite_dep')
endif
# Compile the program
exe = executable('sqlite-test', 'sqlite-test.cpp',
dependencies : sqlite_dep)
# Run tests
test('create a db', exe,
args : ['test.db', 'create table tbl1(one varchar(10))'],
is_parallel : false)
test('add to a db', exe,
args : ['test.db', 'insert into tbl1 values("hello!")'],
is_parallel : false)
test('read a db', exe,
args : ['test.db', 'select * from tbl1'],
is_parallel : false)
test('drop from a db', exe,
args : ['test.db', 'drop table tbl1'],
is_parallel : false)