blob: fc0632cdcb1e3b36f50f544301b459272a89ac3a (
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
|
# file : build2/buildfile
# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
import libs = libbutl%lib{butl}
exe{b}: {hxx ixx txx cxx}{** -b-options -version -dummy} \
{hxx ixx cxx}{b-options} {hxx}{version} \
liba{b} $libs
hxx{version}: in{version} $src_root/file{manifest}
hxx{version}: dist = true
# Fake utility library (without it code generation does not work).
#
liba{b}: {cxx}{dummy}
liba{b}: cxx.export.poptions = "-I$out_root" "-I$src_root"
liba{b}: install = false
# Pass our compiler target to be used as build2 host.
#
obj{b context}: cxx.poptions += -DBUILD2_HOST_TRIPLET=\"$cxx.target\"
if ($cxx.target.class != "windows")
cxx.libs += -lpthread
# Generated options parser.
#
if $cli.configured
{
cli.cxx{b-options}: cli{b}
cli.options += -I $src_root --include-with-brackets --include-prefix build2 \
--guard-prefix BUILD2 --cxx-prologue "#include <build2/types-parsers.hxx>" \
--cli-namespace build2::cl --generate-file-scanner --generate-parse \
--generate-specifier
# Usage options.
#
cli.options += --suppress-undocumented --long-usage --ansi-color \
--page-usage 'build2::print_$name$_' --option-length 20
# Include generated cli files into the distribution.
#
cli.cxx{*}: dist = true
}
|