diff options
Diffstat (limited to 'src/third_party/pcre-8.39/SConscript')
-rw-r--r-- | src/third_party/pcre-8.39/SConscript | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/src/third_party/pcre-8.39/SConscript b/src/third_party/pcre-8.39/SConscript new file mode 100644 index 00000000000..e7b9a59a550 --- /dev/null +++ b/src/third_party/pcre-8.39/SConscript @@ -0,0 +1,68 @@ +# -*- 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", + # pcre posix + "pcreposix.c", + ] ) + |