aboutsummaryrefslogtreecommitdiff
path: root/brep/buildfile
blob: 464118dec2107cdcc6d1ba3e5d02aa89bda2edfe (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
# file      : brep/buildfile
# copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
# license   : MIT; see accompanying LICENSE file

using cli

.: libso{brep brep-apache}

# brep library build rules.
#
import libs += libodb%lib{odb}
import libs += libodb-pgsql%lib{odb-pgsql}
import libs += libbpkg%lib{bpkg}

brep = cxx{package package-traits package-odb}

libso{brep}: $brep $libs
libso{brep}: cxx.export.poptions = -I$out_root -I$src_root

# brep-apache library build rules.
#
import libs += libstudxml%lib{studxml}

brep = cxx{diagnostics module services package-search package-details \
       package-version-details repository-details shared-database page \
       types-parsers} cli.cxx{options}

web = ../web/apache/cxx{request service} ../web/cxx{mime-url-encoding}

libso{brep-apache}: $brep $web libso{brep} $libs

# Set option prefix to the empty value to handle all unknown request parameters
# uniformly with a single catch block.
#
# @@ Adding --option-prefix "" leads to appearing the following warnings
#    related to options _parse methed:
# brep/options.cxx:663:33: warning: unused parameter ‘opt_mode’ [-Wunused-parameter]
#             ::cli::unknown_mode opt_mode,
#
cli.options += -I $src_root --include-with-brackets --include-prefix brep \
--guard-prefix BREP --cxx-prologue "#include <brep/types-parsers>" \
--cli-namespace brep::cli --generate-file-scanner --suppress-usage \
--option-prefix ""

cli.cxx{options}: cli{options}