BUILD.gn 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. # Copyright 2017 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. static_library("url_pattern_index") {
  5. sources = [
  6. "closed_hash_map.h",
  7. "fuzzy_pattern_matching.cc",
  8. "fuzzy_pattern_matching.h",
  9. "ngram_extractor.h",
  10. "string_splitter.h",
  11. "uint64_hasher.h",
  12. "url_pattern.cc",
  13. "url_pattern.h",
  14. "url_pattern_index.cc",
  15. "url_pattern_index.h",
  16. "url_rule_util.cc",
  17. "url_rule_util.h",
  18. ]
  19. public_deps = [
  20. "//components/url_pattern_index/flat:url_pattern_index",
  21. "//components/url_pattern_index/proto:url_pattern_index",
  22. ]
  23. deps = [
  24. "//base",
  25. "//third_party/flatbuffers:flatbuffers",
  26. "//third_party/protobuf:protobuf_lite",
  27. "//url",
  28. ]
  29. }
  30. static_library("test_support") {
  31. testonly = true
  32. sources = [
  33. "url_rule_test_support.cc",
  34. "url_rule_test_support.h",
  35. ]
  36. deps = [
  37. ":url_pattern_index",
  38. "//base",
  39. "//net",
  40. "//third_party/protobuf:protobuf_lite",
  41. "//url",
  42. ]
  43. }
  44. source_set("unit_tests") {
  45. testonly = true
  46. sources = [
  47. "closed_hash_map_unittest.cc",
  48. "fuzzy_pattern_matching_unittest.cc",
  49. "ngram_extractor_unittest.cc",
  50. "string_splitter_unittest.cc",
  51. "url_pattern_index_unittest.cc",
  52. "url_pattern_unittest.cc",
  53. "url_rule_util_unittest.cc",
  54. ]
  55. deps = [
  56. ":test_support",
  57. ":url_pattern_index",
  58. "//base",
  59. "//testing/gmock",
  60. "//testing/gtest",
  61. "//third_party/protobuf:protobuf_lite",
  62. "//url",
  63. ]
  64. }