Paul Wankadia | a96b464 | 2015-04-27 20:29:47 +1000 | [diff] [blame^] | 1 | # Bazel (http://bazel.io/) BUILD file for RE2. |
Ming Zhao | dd22332 | 2015-04-21 11:41:18 -0700 | [diff] [blame] | 2 | |
| 3 | licenses(["notice"]) |
| 4 | |
Paul Wankadia | a96b464 | 2015-04-27 20:29:47 +1000 | [diff] [blame^] | 5 | # stringpiece is a standalone library so that it can be used without pulling in |
| 6 | # all of the other parts of RE2. |
Ming Zhao | dd22332 | 2015-04-21 11:41:18 -0700 | [diff] [blame] | 7 | cc_library( |
Paul Wankadia | a96b464 | 2015-04-27 20:29:47 +1000 | [diff] [blame^] | 8 | name = "stringpiece", |
| 9 | srcs = ["re2/stringpiece.cc"], |
| 10 | hdrs = ["re2/stringpiece.h"], |
| 11 | includes = ["."], |
| 12 | visibility = ["//visibility:public"], |
Ming Zhao | dd22332 | 2015-04-21 11:41:18 -0700 | [diff] [blame] | 13 | ) |
| 14 | |
| 15 | cc_library( |
Paul Wankadia | a96b464 | 2015-04-27 20:29:47 +1000 | [diff] [blame^] | 16 | name = "re2", |
| 17 | srcs = [ |
| 18 | "re2/bitstate.cc", |
| 19 | "re2/compile.cc", |
| 20 | "re2/dfa.cc", |
| 21 | "re2/filtered_re2.cc", |
| 22 | "re2/mimics_pcre.cc", |
| 23 | "re2/nfa.cc", |
| 24 | "re2/onepass.cc", |
| 25 | "re2/parse.cc", |
| 26 | "re2/perl_groups.cc", |
| 27 | "re2/prefilter.cc", |
| 28 | "re2/prefilter.h", |
| 29 | "re2/prefilter_tree.cc", |
| 30 | "re2/prefilter_tree.h", |
| 31 | "re2/prog.cc", |
| 32 | "re2/prog.h", |
| 33 | "re2/re2.cc", |
| 34 | "re2/regexp.cc", |
| 35 | "re2/regexp.h", |
| 36 | "re2/set.cc", |
| 37 | "re2/simplify.cc", |
| 38 | "re2/tostring.cc", |
| 39 | "re2/unicode_casefold.cc", |
| 40 | "re2/unicode_casefold.h", |
| 41 | "re2/unicode_groups.cc", |
| 42 | "re2/unicode_groups.h", |
| 43 | "re2/walker-inl.h", |
| 44 | "util/atomicops.h", |
| 45 | "util/flags.h", |
| 46 | "util/hash.cc", |
| 47 | "util/logging.h", |
| 48 | "util/mutex.h", |
| 49 | "util/rune.cc", |
| 50 | "util/sparse_array.h", |
| 51 | "util/sparse_set.h", |
| 52 | "util/stringprintf.cc", |
| 53 | "util/strutil.cc", |
| 54 | "util/utf.h", |
| 55 | "util/util.h", |
| 56 | "util/valgrind.cc", |
| 57 | "util/valgrind.h", |
| 58 | ], |
| 59 | hdrs = [ |
| 60 | "re2/filtered_re2.h", |
| 61 | "re2/re2.h", |
| 62 | "re2/set.h", |
| 63 | "re2/variadic_function.h", |
| 64 | ], |
| 65 | includes = ["."], |
| 66 | linkopts = ["-pthread"], |
| 67 | visibility = ["//visibility:public"], |
| 68 | deps = [ |
| 69 | ":stringpiece", |
| 70 | ], |
Ming Zhao | dd22332 | 2015-04-21 11:41:18 -0700 | [diff] [blame] | 71 | ) |
| 72 | |
Ming Zhao | dd22332 | 2015-04-21 11:41:18 -0700 | [diff] [blame] | 73 | cc_library( |
Paul Wankadia | a96b464 | 2015-04-27 20:29:47 +1000 | [diff] [blame^] | 74 | name = "test", |
| 75 | testonly = 1, |
| 76 | srcs = [ |
| 77 | "re2/testing/backtrack.cc", |
| 78 | "re2/testing/dump.cc", |
| 79 | "re2/testing/regexp_generator.cc", |
| 80 | "re2/testing/string_generator.cc", |
| 81 | "re2/testing/tester.cc", |
| 82 | "util/pcre.cc", |
| 83 | "util/random.cc", |
| 84 | "util/test.cc", |
| 85 | ], |
| 86 | hdrs = [ |
| 87 | "re2/testing/regexp_generator.h", |
| 88 | "re2/testing/string_generator.h", |
| 89 | "re2/testing/tester.h", |
| 90 | "util/pcre.h", |
| 91 | "util/random.h", |
| 92 | "util/test.h", |
| 93 | ], |
| 94 | includes = ["."], |
| 95 | deps = [ |
| 96 | ":re2", |
| 97 | ], |
Ming Zhao | dd22332 | 2015-04-21 11:41:18 -0700 | [diff] [blame] | 98 | ) |
| 99 | |
| 100 | load("re2_test", "re2_test") |
| 101 | |
| 102 | re2_test("charclass_test") |
| 103 | re2_test("compile_test") |
| 104 | re2_test("filtered_re2_test") |
| 105 | re2_test("mimics_pcre_test") |
| 106 | re2_test("parse_test") |
| 107 | re2_test("possible_match_test") |
| 108 | re2_test("re2_test") |
| 109 | re2_test("re2_arg_test") |
| 110 | re2_test("regexp_test") |
| 111 | re2_test("required_prefix_test") |
| 112 | re2_test("search_test") |
| 113 | re2_test("set_test") |
| 114 | re2_test("simplify_test") |
| 115 | re2_test("string_generator_test") |
| 116 | |
Paul Wankadia | a96b464 | 2015-04-27 20:29:47 +1000 | [diff] [blame^] | 117 | # TODO: Add the "big" tests from the Makefile. |
| 118 | # util/thread.{cc,h} will be needed for the DFA test. |
| 119 | # re2/testing/exhaustive_tester.{cc,h} will be needed for the exhaustive tests. |