summaryrefslogtreecommitdiff
path: root/Jamroot.jam
blob: 51c4191a5c83337d7c956dc2998de4a8c32908a8 (plain)
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
using gcc ;

using pkg-config ;
import pkg-config ;
import testing ;
import type : register ;
import generators : register-standard ;
import regex : replace ;

pkg-config.import libmariadb ;
pkg-config.import libpq ;
lib po : : <name>boost_program_options ;

variant coverage : debug ;

project : requirements
	<cxxstd>20
	<visibility>hidden
	<linkflags>"-Wl,-z,defs,--warn-once,--gc-sections"
	<variant>release:<lto>on
	<variant>debug:<warnings>extra
	<variant>debug:<warnings-as-errors>on
	<variant>debug:<cflags>-Wconversion
	<variant>coverage:<coverage>on
	<toolset>tidy:<checkxx>boost-*
	<toolset>tidy:<checkxx>bugprone-*
	<toolset>tidy:<xcheckxx>bugprone-macro-parentheses
	<toolset>tidy:<checkxx>clang-*
	<toolset>tidy:<checkxx>misc-*
	<toolset>tidy:<xcheckxx>misc-non-private-member-variables-in-classes
	<toolset>tidy:<checkxx>modernize-*
	<toolset>tidy:<xcheckxx>modernize-use-trailing-return-type
	<toolset>tidy:<checkxx>hicpp-*
	<toolset>tidy:<xcheckxx>hicpp-vararg
	<toolset>tidy:<xcheckxx>hicpp-signed-bitwise
	<toolset>tidy:<xcheckxx>hicpp-named-parameter
	<toolset>tidy:<xcheckxx>hicpp-no-array-decay
	<toolset>tidy:<checkxx>performance-*
	<toolset>tidy:<mapping>iwyu.json
	;

build-project main ;
build-project test ;

path-constant root : . ;

type.register SQL : sql ;

generators.register-standard embed.sql : SQL : CPP H ;

actions embed.sql
{
	echo "#include \"$(2:B).h\"" > $(1[1])
	m4 -DSOURCE=$(2) -DNS=$(NS) -DNAME=$(2:B) > $(1[2]) lib/genstmt.m4
}
rule embed.sql ( targets * : sources * : properties * )
{
	DEPENDS $(targets) : $(root)/lib/genstmt.m4 ;
	NS on $(targets) = [ replace $(sources:D) "/" "::" ] ;
}
IMPORT $(__name__) : embed.sql : : embed.sql ;