BUILD.gn revision 5d1f7b1de12d16ceb2c938c56701a3e8bfa558f7
1# Copyright 2014 The Chromium Authors. All rights reserved. 2# Use of this source code is governed by a BSD-style license that can be 3# found in the LICENSE file. 4 5# TODO(brettw) use this value when we remove external=true below. 6#gyp_file = "//$gyp_output_dir/gn_gyp/third_party/re2/re2.gyp" 7 8config("re2_config") { 9 include_dirs = [ "." ] 10} 11 12static_library("re2") { 13 external = true 14 sources = [ 15 "mswin/stdint.h", 16 "re2/bitstate.cc", 17 "re2/compile.cc", 18 "re2/dfa.cc", 19 "re2/filtered_re2.cc", 20 "re2/filtered_re2.h", 21 "re2/mimics_pcre.cc", 22 "re2/nfa.cc", 23 "re2/onepass.cc", 24 "re2/parse.cc", 25 "re2/perl_groups.cc", 26 "re2/prefilter.cc", 27 "re2/prefilter.h", 28 "re2/prefilter_tree.cc", 29 "re2/prefilter_tree.h", 30 "re2/prog.cc", 31 "re2/prog.h", 32 "re2/re2.cc", 33 "re2/re2.h", 34 "re2/regexp.cc", 35 "re2/regexp.h", 36 "re2/set.cc", 37 "re2/set.h", 38 "re2/simplify.cc", 39 "re2/stringpiece.h", 40 "re2/tostring.cc", 41 "re2/unicode_casefold.cc", 42 "re2/unicode_casefold.h", 43 "re2/unicode_groups.cc", 44 "re2/unicode_groups.h", 45 "re2/variadic_function.h", 46 "re2/walker-inl.h", 47 "util/arena.cc", 48 "util/arena.h", 49 "util/atomicops.h", 50 "util/flags.h", 51 "util/hash.cc", 52 "util/logging.h", 53 "util/mutex.h", 54 "util/rune.cc", 55 "util/sparse_array.h", 56 "util/sparse_set.h", 57 "util/stringpiece.cc", 58 "util/stringprintf.cc", 59 "util/strutil.cc", 60 "util/utf.h", 61 "util/util.h", 62 ] 63 64 configs -= [ "//build/config/compiler:chromium_code" ] 65 configs += [ "//build/config/compiler:no_chromium_code" ] 66 direct_dependent_configs = [ ":re2_config" ] 67 68 deps = [ 69 "//base/third_party/dynamic_annotations", 70 ] 71 72 if (is_win) { 73 include_dirs = [ "mswin" ] 74 cflags = [ 75 "/wd4267", # Conversion from size_t. 76 "/wd4722", # Destructor never terminates. 77 ] 78 } else { 79 sources -= [ "mswin/stdint.h" ] 80 } 81} 82