BUILD.gn 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Copyright 2020 The Chromium Authors. All rights reserved.
  2. # Use of this source code is governed by an MIT-style license that can be
  3. # found in the LICENSE file or at https://opensource.org/licenses/MIT.
  4. import("//testing/libfuzzer/fuzzer_test.gni")
  5. import("//testing/test.gni")
  6. config("warnings") {
  7. cflags = [ "-Wno-shadow" ]
  8. }
  9. component("liburlpattern") {
  10. defines = [ "IS_LIBURLPATTERN_IMPL" ]
  11. deps = [
  12. "//base:base",
  13. "//third_party/abseil-cpp:absl",
  14. "//third_party/icu:icu",
  15. ]
  16. configs += [ ":warnings" ]
  17. # Note, also update the local modifications in README.chromium.
  18. sources = [
  19. "options.h",
  20. "parse.cc",
  21. "parse.h",
  22. "pattern.cc",
  23. "pattern.h",
  24. "tokenize.cc",
  25. "tokenize.h",
  26. "utils.cc",
  27. "utils.h",
  28. ]
  29. }
  30. test("liburlpattern_unittests") {
  31. deps = [
  32. ":liburlpattern",
  33. "//base/test:run_all_unittests",
  34. "//testing/gtest",
  35. "//third_party/abseil-cpp:absl",
  36. "//third_party/icu:icu",
  37. ]
  38. # Note, also update the local modifications in README.chromium.
  39. sources = [
  40. "parse_unittest.cc",
  41. "pattern_unittest.cc",
  42. "tokenize_unittest.cc",
  43. "utils_unittest.cc",
  44. ]
  45. testonly = true
  46. }
  47. fuzzer_test("liburlpattern_fuzzer") {
  48. sources = [ "parse_fuzzer.cc" ]
  49. deps = [
  50. ":liburlpattern",
  51. "//base",
  52. "//third_party/abseil-cpp:absl",
  53. ]
  54. }