BUILD.gn 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. # Copyright 2018 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. if (is_android) {
  5. import("//build/config/android/rules.gni")
  6. }
  7. static_library("task") {
  8. sources = [
  9. "closure_task.cc",
  10. "closure_task.h",
  11. "sql_callback_task.cc",
  12. "sql_callback_task.h",
  13. "sql_store_base.cc",
  14. "sql_store_base.h",
  15. "task.cc",
  16. "task.h",
  17. "task_queue.cc",
  18. "task_queue.h",
  19. ]
  20. deps = [
  21. "//base",
  22. "//sql",
  23. ]
  24. }
  25. static_library("test_support") {
  26. testonly = true
  27. sources = [
  28. "task_test_base.cc",
  29. "task_test_base.h",
  30. "test_task.cc",
  31. "test_task.h",
  32. "test_task_runner.cc",
  33. "test_task_runner.h",
  34. ]
  35. deps = [
  36. ":task",
  37. "//base",
  38. "//base/test:test_support",
  39. "//testing/gmock",
  40. "//testing/gtest",
  41. ]
  42. }
  43. source_set("unit_tests") {
  44. testonly = true
  45. sources = [
  46. "task_queue_unittest.cc",
  47. "task_unittest.cc",
  48. ]
  49. deps = [
  50. ":task",
  51. ":test_support",
  52. "//base",
  53. "//base/test:test_support",
  54. "//testing/gtest",
  55. ]
  56. }