summaryrefslogtreecommitdiff
path: root/libxerces-c/build/root.build
blob: d61764cc2514dea8226113ad047adee8435b95e7 (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      : build/root.build
# license   : Apache License 2.0; see accompanying LICENSE file

# We rely on C99 in macro deductions (see xercesc/config.h and
# xercesc/util/Xerces_autoconf_config.hpp for details).
#
c.std = 99

using c

h{*}: extension = h
c{*}: extension = c

cxx.std = latest

using cxx

hxx{*}: extension = hpp
txx{*}: extension = c
cxx{*}: extension = cpp

if ($c.target.system == 'win32-msvc')
  cc.poptions += -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS

if ($c.class == 'msvc')
  cc.coptions += /wd4251 /wd4275 /wd4800

# Enable network support so that the parser can download remote resources
# (schemas, DTDs, etc).
#
# If enabled, then the libcurl library is used to access network resources.
#
config [bool] config.libxerces_c.network ?= false

# We use ICU everywhere except on Mac OS and Windows where we by default
# use native transcoders (but can still be forced to use ICU instead).
#
config [bool] config.libxerces_c.transcoder_icu ?= \
  ($cxx.target.class != 'macos' && $cxx.target.class != 'windows')

if! $config.libxerces_c.transcoder_icu
{
  assert ($cxx.target.class == 'macos' || $cxx.target.class == 'windows') \
    "only ICU transcoder is supported on $cxx.target.class"
}