diff options
author | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-04 23:16:58 +0000 |
---|---|---|
committer | phajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-04 23:16:58 +0000 |
commit | ed82f5d5e6a688afa5e0e9571cbb631d8a94db6e (patch) | |
tree | fdf3fc6d92f0625d0b51f385baf49b07705796ec /third_party/re2 | |
parent | 6d593831651417109258722a761364f8f6ba33cd (diff) | |
download | chromium_src-ed82f5d5e6a688afa5e0e9571cbb631d8a94db6e.zip chromium_src-ed82f5d5e6a688afa5e0e9571cbb631d8a94db6e.tar.gz chromium_src-ed82f5d5e6a688afa5e0e9571cbb631d8a94db6e.tar.bz2 |
Linux: add option for building with system re2.
Note that Google Chrome will continue to use bundled re2.
The option is off by default, and is intended for Linux distros.
BUG=165264
TEST=none
Review URL: https://codereview.chromium.org/11366051
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175227 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/re2')
-rw-r--r-- | third_party/re2/re2.gyp | 178 |
1 files changed, 104 insertions, 74 deletions
diff --git a/third_party/re2/re2.gyp b/third_party/re2/re2.gyp index fe11a65..3c1afbe 100644 --- a/third_party/re2/re2.gyp +++ b/third_party/re2/re2.gyp @@ -4,83 +4,113 @@ { 'variables': { + 'use_system_re2%': 0, }, - 'targets': [ - { - 'target_name': 're2', - 'type': 'static_library', - 'include_dirs': [ - '.', - '<(DEPTH)', - ], - 'direct_dependent_settings': { - 'include_dirs': [ - '.', - '<(DEPTH)', - ], - }, - 'dependencies': [ - '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', - ], - 'sources': [ - 're2/bitstate.cc', - 're2/compile.cc', - 're2/dfa.cc', - 're2/filtered_re2.cc', - 're2/filtered_re2.h', - 're2/mimics_pcre.cc', - 're2/nfa.cc', - 're2/onepass.cc', - 're2/parse.cc', - 're2/perl_groups.cc', - 're2/prefilter.cc', - 're2/prefilter.h', - 're2/prefilter_tree.cc', - 're2/prefilter_tree.h', - 're2/prog.cc', - 're2/prog.h', - 're2/re2.cc', - 're2/re2.h', - 're2/regexp.cc', - 're2/regexp.h', - 're2/set.cc', - 're2/set.h', - 're2/simplify.cc', - 're2/stringpiece.h', - 're2/tostring.cc', - 're2/unicode_casefold.cc', - 're2/unicode_casefold.h', - 're2/unicode_groups.cc', - 're2/unicode_groups.h', - 're2/variadic_function.h', - 're2/walker-inl.h', - 'util/arena.cc', - 'util/arena.h', - 'util/atomicops.h', - 'util/flags.h', - 'util/hash.cc', - 'util/logging.h', - 'util/mutex.h', - 'util/rune.cc', - 'util/sparse_array.h', - 'util/sparse_set.h', - 'util/stringpiece.cc', - 'util/stringprintf.cc', - 'util/strutil.cc', - 'util/utf.h', - 'util/util.h', - ], - 'conditions': [ - ['OS=="win"', { + 'conditions': [ + ['use_system_re2==0', { + 'targets': [ + { + 'target_name': 're2', + 'type': 'static_library', + 'include_dirs': [ + '.', + '<(DEPTH)', + ], + 'direct_dependent_settings': { + 'include_dirs': [ + '.', + '<(DEPTH)', + ], + }, + 'dependencies': [ + '<(DEPTH)/base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations', + ], 'sources': [ - 'mswin/stdint.h' + 're2/bitstate.cc', + 're2/compile.cc', + 're2/dfa.cc', + 're2/filtered_re2.cc', + 're2/filtered_re2.h', + 're2/mimics_pcre.cc', + 're2/nfa.cc', + 're2/onepass.cc', + 're2/parse.cc', + 're2/perl_groups.cc', + 're2/prefilter.cc', + 're2/prefilter.h', + 're2/prefilter_tree.cc', + 're2/prefilter_tree.h', + 're2/prog.cc', + 're2/prog.h', + 're2/re2.cc', + 're2/re2.h', + 're2/regexp.cc', + 're2/regexp.h', + 're2/set.cc', + 're2/set.h', + 're2/simplify.cc', + 're2/stringpiece.h', + 're2/tostring.cc', + 're2/unicode_casefold.cc', + 're2/unicode_casefold.h', + 're2/unicode_groups.cc', + 're2/unicode_groups.h', + 're2/variadic_function.h', + 're2/walker-inl.h', + 'util/arena.cc', + 'util/arena.h', + 'util/atomicops.h', + 'util/flags.h', + 'util/hash.cc', + 'util/logging.h', + 'util/mutex.h', + 'util/rune.cc', + 'util/sparse_array.h', + 'util/sparse_set.h', + 'util/stringpiece.cc', + 'util/stringprintf.cc', + 'util/strutil.cc', + 'util/utf.h', + 'util/util.h', ], - 'include_dirs': [ - 'mswin' + 'conditions': [ + ['OS=="win"', { + 'sources': [ + 'mswin/stdint.h' + ], + 'include_dirs': [ + 'mswin' + ], + 'msvs_disabled_warnings': [ 4018, 4722 ], + }] + ] + }, + ], + }, { # use_system_re2==1 + 'targets': [ + { + 'target_name': 're2', + 'type': 'none', + 'variables': { + 'headers_root_path': '.', + 'header_filenames': [ + 're2/filtered_re2.h', + 're2/re2.h', + 're2/set.h', + 're2/stringpiece.h', + 're2/variadic_function.h', + ], + }, + 'includes': [ + '../../build/shim_headers.gypi', ], - 'msvs_disabled_warnings': [ 4018, 4722 ], - }] - ] - }, + 'link_settings': { + 'libraries': [ + '-lre2', + ], + }, + } + ], + }], ], } |