Skip direct map from apk check for pre-KitKat Samsung.
[chromium-blink-merge.git] / sql / BUILD.gn
blob05185d5cc26ebc60d706f105bf67d055f0a9aed4
1 # Copyright 2014 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.
5 import("//testing/test.gni")
7 component("sql") {
8   sources = [
9     "connection.cc",
10     "connection.h",
11     "error_delegate_util.cc",
12     "error_delegate_util.h",
13     "init_status.h",
14     "meta_table.cc",
15     "meta_table.h",
16     "recovery.cc",
17     "recovery.h",
18     "statement.cc",
19     "statement.h",
20     "transaction.cc",
21     "transaction.h",
22   ]
24   defines = [ "SQL_IMPLEMENTATION" ]
26   if (is_win) {
27     cflags = [ "/wd4267" ]  # size_t to int.
28   }
30   deps = [
31     "//base",
32     "//third_party/sqlite",
33     "//base/third_party/dynamic_annotations",
34   ]
37 source_set("test_support") {
38   testonly = true
39   sources = [
40     "test/error_callback_support.cc",
41     "test/error_callback_support.h",
42     "test/scoped_error_ignorer.cc",
43     "test/scoped_error_ignorer.h",
44     "test/test_helpers.cc",
45     "test/test_helpers.h",
46   ]
48   deps = [
49     ":sql",
50     "//base",
51     "//testing/gtest",
52   ]
55 test("sql_unittests") {
56   sources = [
57     "connection_unittest.cc",
58     "meta_table_unittest.cc",
59     "recovery_unittest.cc",
60     "sqlite_features_unittest.cc",
61     "statement_unittest.cc",
62     "test/paths.cc",
63     "test/paths.h",
64     "test/run_all_unittests.cc",
65     "test/sql_test_suite.cc",
66     "test/sql_test_suite.h",
67     "transaction_unittest.cc",
68   ]
70   if (is_win) {
71     cflags = [ "/wd4267" ]  # size_t -> int
72   }
74   deps = [
75     ":sql",
76     ":test_support",
77     "//base/allocator",
78     "//base/test:test_support",
79     "//testing/gtest",
80     "//third_party/sqlite",
81   ]
83   # TODO(GYP)
84   #['OS == "android"', {
85   #  'dependencies': [
86   #    '../testing/android/native_test.gyp:native_test_native_code',
87   #  ],
88   #}],
91 if (is_android) {
92   #TODO(GYP)
93   #'target_name': 'sql_unittests_apk',
94   #'type': 'none',
95   #'dependencies': [
96   #  'sql_unittests',
97   #],
98   #'variables': {
99   #  'test_suite_name': 'sql_unittests',
100   #},
101   #'includes': [ '../build/apk_test.gypi' ],