summaryrefslogtreecommitdiff
path: root/src/third_party/pcre-8.42/SConscript
blob: 71cc36ea5c59ad5ebe2ac2a9f6dbf90e07eeef62 (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
62
63
64
65
66
# -*- mode: python -*-

Import("env")

env = env.Clone()

env.Append( CPPDEFINES=[ "HAVE_CONFIG_H",  ] )

def removeIfPresent(lst, item):
    try:
        lst.remove(item)
    except ValueError:
        pass

for to_remove in ['-Werror', '-Wall', '-W']:
    removeIfPresent(env['CCFLAGS'], to_remove)

# Directories that include generated config.h for various platforms
#
# Generated via
# AutoTools (non-Windows)
#  ./configure --disable-stack-for-recursion --enable-utf --enable-unicode-properties
#   --with-match-limit=200000 --with-match-limit-recursion=4000 --enable-shared=no
# CMake (Windows)
#  -DPCRE_SUPPORT_PCREGREP_JIT:BOOL="0" -DPCRE_BUILD_TESTS:BOOL="0"
#  -DPCRE_POSIX_MALLOC_THRESHOLD:STRING="10" -DPCRE_MATCH_LIMIT_RECURSION:STRING="4000"
#  -DPCRE_NO_RECURSE:BOOL="1" -DPCRE_LINK_SIZE:STRING="2" -DPCRE_NEWLINE:STRING="LF"
#  -DPCRE_SUPPORT_UNICODE_PROPERTIES:BOOL="1" -DPCREGREP_BUFSIZE:STRING="20480"
#  -DPCRE_MATCH_LIMIT:STRING="200000" -DPCRE_PARENS_NEST_LIMIT:STRING="250"
#  -DPCRE_SUPPORT_UTF:BOOL="1"
#
if env.TargetOSIs('windows'):
    env.Append(CPPPATH=["build_windows"])
elif env.TargetOSIs('solaris'):
    env.Append(CPPPATH=["build_solaris"])
else:
    env.Append(CPPPATH=["build_posix"])

env.Library( "pcrecpp", [
        # pcre
        "pcre_byte_order.c",
        "pcre_compile.c",
        "pcre_config.c",
        "pcre_dfa_exec.c",
        "pcre_exec.c",
        "pcre_fullinfo.c",
        "pcre_get.c",
        "pcre_globals.c",
        "pcre_maketables.c",
        "pcre_newline.c",
        "pcre_ord2utf8.c",
        "pcre_refcount.c",
        "pcre_string_utils.c",
        "pcre_study.c",
        "pcre_tables.c",
        "pcre_ucd.c",
        "pcre_valid_utf8.c",
        "pcre_version.c",
        "pcre_xclass.c",
        # pcre nodist
        "pcre_chartables.c",
        # pcre cpp
        "pcrecpp.cc",
        "pcre_scanner.cc",
        "pcre_stringpiece.cc",
        ] )