Paul Wankadia | f3a9588 | 2015-09-26 03:21:18 +1000 | [diff] [blame] | 1 | # Copyright 2009 The RE2 Authors. All Rights Reserved. |
| 2 | # Use of this source code is governed by a BSD-style |
| 3 | # license that can be found in the LICENSE file. |
| 4 | |
Paul Wankadia | a96b464 | 2015-04-27 20:29:47 +1000 | [diff] [blame] | 5 | # Bazel (http://bazel.io/) BUILD file for RE2. |
Ming Zhao | dd22332 | 2015-04-21 11:41:18 -0700 | [diff] [blame] | 6 | |
| 7 | licenses(["notice"]) |
| 8 | |
Ming Zhao | dd22332 | 2015-04-21 11:41:18 -0700 | [diff] [blame] | 9 | cc_library( |
Paul Wankadia | a96b464 | 2015-04-27 20:29:47 +1000 | [diff] [blame] | 10 | name = "re2", |
| 11 | srcs = [ |
| 12 | "re2/bitstate.cc", |
| 13 | "re2/compile.cc", |
| 14 | "re2/dfa.cc", |
| 15 | "re2/filtered_re2.cc", |
| 16 | "re2/mimics_pcre.cc", |
| 17 | "re2/nfa.cc", |
| 18 | "re2/onepass.cc", |
| 19 | "re2/parse.cc", |
| 20 | "re2/perl_groups.cc", |
| 21 | "re2/prefilter.cc", |
| 22 | "re2/prefilter.h", |
| 23 | "re2/prefilter_tree.cc", |
| 24 | "re2/prefilter_tree.h", |
| 25 | "re2/prog.cc", |
| 26 | "re2/prog.h", |
| 27 | "re2/re2.cc", |
| 28 | "re2/regexp.cc", |
| 29 | "re2/regexp.h", |
| 30 | "re2/set.cc", |
| 31 | "re2/simplify.cc", |
Paul Wankadia | 791beff | 2015-11-17 00:15:44 +1100 | [diff] [blame] | 32 | "re2/stringpiece.cc", |
Paul Wankadia | a96b464 | 2015-04-27 20:29:47 +1000 | [diff] [blame] | 33 | "re2/tostring.cc", |
| 34 | "re2/unicode_casefold.cc", |
| 35 | "re2/unicode_casefold.h", |
| 36 | "re2/unicode_groups.cc", |
| 37 | "re2/unicode_groups.h", |
| 38 | "re2/walker-inl.h", |
| 39 | "util/atomicops.h", |
| 40 | "util/flags.h", |
| 41 | "util/hash.cc", |
Paul Wankadia | 7e48200 | 2015-10-24 12:17:07 +1100 | [diff] [blame] | 42 | "util/logging.cc", |
Paul Wankadia | a96b464 | 2015-04-27 20:29:47 +1000 | [diff] [blame] | 43 | "util/logging.h", |
| 44 | "util/mutex.h", |
| 45 | "util/rune.cc", |
| 46 | "util/sparse_array.h", |
| 47 | "util/sparse_set.h", |
| 48 | "util/stringprintf.cc", |
| 49 | "util/strutil.cc", |
| 50 | "util/utf.h", |
| 51 | "util/util.h", |
| 52 | "util/valgrind.cc", |
| 53 | "util/valgrind.h", |
| 54 | ], |
| 55 | hdrs = [ |
| 56 | "re2/filtered_re2.h", |
| 57 | "re2/re2.h", |
| 58 | "re2/set.h", |
Paul Wankadia | 791beff | 2015-11-17 00:15:44 +1100 | [diff] [blame] | 59 | "re2/stringpiece.h", |
Paul Wankadia | a96b464 | 2015-04-27 20:29:47 +1000 | [diff] [blame] | 60 | "re2/variadic_function.h", |
| 61 | ], |
Paul Wankadia | 46d730b | 2016-01-03 17:38:22 +1100 | [diff] [blame] | 62 | copts = ["-pthread"], |
Paul Wankadia | a96b464 | 2015-04-27 20:29:47 +1000 | [diff] [blame] | 63 | includes = ["."], |
| 64 | linkopts = ["-pthread"], |
| 65 | visibility = ["//visibility:public"], |
Ming Zhao | dd22332 | 2015-04-21 11:41:18 -0700 | [diff] [blame] | 66 | ) |
| 67 | |
Ming Zhao | dd22332 | 2015-04-21 11:41:18 -0700 | [diff] [blame] | 68 | cc_library( |
Paul Wankadia | a96b464 | 2015-04-27 20:29:47 +1000 | [diff] [blame] | 69 | name = "test", |
| 70 | testonly = 1, |
| 71 | srcs = [ |
| 72 | "re2/testing/backtrack.cc", |
| 73 | "re2/testing/dump.cc", |
Paul Wankadia | f3a9588 | 2015-09-26 03:21:18 +1000 | [diff] [blame] | 74 | "re2/testing/exhaustive_tester.cc", |
| 75 | "re2/testing/null_walker.cc", |
Paul Wankadia | a96b464 | 2015-04-27 20:29:47 +1000 | [diff] [blame] | 76 | "re2/testing/regexp_generator.cc", |
| 77 | "re2/testing/string_generator.cc", |
| 78 | "re2/testing/tester.cc", |
| 79 | "util/pcre.cc", |
| 80 | "util/random.cc", |
| 81 | "util/test.cc", |
Paul Wankadia | f3a9588 | 2015-09-26 03:21:18 +1000 | [diff] [blame] | 82 | "util/thread.cc", |
Paul Wankadia | a96b464 | 2015-04-27 20:29:47 +1000 | [diff] [blame] | 83 | ], |
| 84 | hdrs = [ |
Paul Wankadia | f3a9588 | 2015-09-26 03:21:18 +1000 | [diff] [blame] | 85 | "re2/testing/exhaustive_tester.h", |
Paul Wankadia | a96b464 | 2015-04-27 20:29:47 +1000 | [diff] [blame] | 86 | "re2/testing/regexp_generator.h", |
| 87 | "re2/testing/string_generator.h", |
| 88 | "re2/testing/tester.h", |
| 89 | "util/pcre.h", |
| 90 | "util/random.h", |
| 91 | "util/test.h", |
Paul Wankadia | f3a9588 | 2015-09-26 03:21:18 +1000 | [diff] [blame] | 92 | "util/thread.h", |
Paul Wankadia | a96b464 | 2015-04-27 20:29:47 +1000 | [diff] [blame] | 93 | ], |
| 94 | includes = ["."], |
Paul Wankadia | 791beff | 2015-11-17 00:15:44 +1100 | [diff] [blame] | 95 | deps = [":re2"], |
Ming Zhao | dd22332 | 2015-04-21 11:41:18 -0700 | [diff] [blame] | 96 | ) |
| 97 | |
| 98 | load("re2_test", "re2_test") |
| 99 | |
| 100 | re2_test("charclass_test") |
| 101 | re2_test("compile_test") |
| 102 | re2_test("filtered_re2_test") |
| 103 | re2_test("mimics_pcre_test") |
| 104 | re2_test("parse_test") |
| 105 | re2_test("possible_match_test") |
Ming Zhao | dd22332 | 2015-04-21 11:41:18 -0700 | [diff] [blame] | 106 | re2_test("re2_arg_test") |
Paul Wankadia | 1add804 | 2016-02-09 20:37:03 +1100 | [diff] [blame^] | 107 | re2_test("re2_test") |
Ming Zhao | dd22332 | 2015-04-21 11:41:18 -0700 | [diff] [blame] | 108 | re2_test("regexp_test") |
| 109 | re2_test("required_prefix_test") |
| 110 | re2_test("search_test") |
| 111 | re2_test("set_test") |
| 112 | re2_test("simplify_test") |
| 113 | re2_test("string_generator_test") |
| 114 | |
Paul Wankadia | 1add804 | 2016-02-09 20:37:03 +1100 | [diff] [blame^] | 115 | re2_test("dfa_test", size="large") |
| 116 | re2_test("exhaustive1_test", size="large") |
| 117 | re2_test("exhaustive2_test", size="large") |
| 118 | re2_test("exhaustive3_test", size="large") |
| 119 | re2_test("exhaustive_test", size="large") |
Damien Martin-Guillerez | 22a07e6 | 2016-01-13 17:28:26 +0100 | [diff] [blame] | 120 | re2_test("random_test", size="large") |
Paul Wankadia | f3a9588 | 2015-09-26 03:21:18 +1000 | [diff] [blame] | 121 | |
| 122 | # TODO: Add support for regexp_benchmark. |