blob: 944defd6bc932fd994aca347f6a1c8727278aa7d [file] [log] [blame]
[email protected]3e1d8c82012-05-31 04:36:031# Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]40ce1e442011-06-30 15:03:112# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5{
6 'variables': {
7 'chromium_code': 1,
8 },
9 'targets': [
10 {
11 'target_name': 'sql',
[email protected]d4526962011-11-10 21:40:2812 'type': '<(component)',
[email protected]40ce1e442011-06-30 15:03:1113 'dependencies': [
14 '../base/base.gyp:base',
15 '../third_party/sqlite/sqlite.gyp:sqlite',
16 ],
[email protected]4350e322013-06-18 22:18:1017 'export_dependent_settings': [
18 '../base/base.gyp:base',
19 ],
[email protected]d4526962011-11-10 21:40:2820 'defines': [ 'SQL_IMPLEMENTATION' ],
[email protected]40ce1e442011-06-30 15:03:1121 'sources': [
[email protected]f0a54b22011-07-19 18:40:2122 'connection.cc',
23 'connection.h',
[email protected]0d04ede2012-10-18 04:31:5324 'error_delegate_util.cc',
25 'error_delegate_util.h',
[email protected]f0a54b22011-07-19 18:40:2126 'init_status.h',
27 'meta_table.cc',
28 'meta_table.h',
29 'statement.cc',
30 'statement.h',
31 'transaction.cc',
32 'transaction.h',
[email protected]40ce1e442011-06-30 15:03:1133 ],
[email protected]4350e322013-06-18 22:18:1034 'include_dirs': [
35 '..',
36 ],
37 'direct_dependent_settings': {
38 'include_dirs': [
39 '..',
40 ],
41 },
[email protected]4be31d42013-01-11 18:47:5342 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
43 'msvs_disabled_warnings': [4267, ],
[email protected]40ce1e442011-06-30 15:03:1144 },
45 {
[email protected]4350e322013-06-18 22:18:1046 'target_name': 'test_support_sql',
47 'type': 'static_library',
48 'dependencies': [
49 'sql',
50 '../base/base.gyp:base',
51 '../testing/gtest.gyp:gtest',
52 ],
53 'export_dependent_settings': [
54 'sql',
55 '../base/base.gyp:base',
56 ],
57 'sources': [
58 'test/scoped_error_ignorer.cc',
59 'test/scoped_error_ignorer.h',
60 ],
61 'include_dirs': [
62 '..',
63 ],
64 'direct_dependent_settings': {
65 'include_dirs': [
66 '..',
67 ],
68 },
69 },
70 {
[email protected]40ce1e442011-06-30 15:03:1171 'target_name': 'sql_unittests',
[email protected]3e1d8c82012-05-31 04:36:0372 'type': '<(gtest_target_type)',
[email protected]40ce1e442011-06-30 15:03:1173 'dependencies': [
74 'sql',
[email protected]4350e322013-06-18 22:18:1075 'test_support_sql',
[email protected]40ce1e442011-06-30 15:03:1176 '../base/base.gyp:test_support_base',
77 '../testing/gtest.gyp:gtest',
78 ],
79 'sources': [
[email protected]f0a54b22011-07-19 18:40:2180 'run_all_unittests.cc',
81 'connection_unittest.cc',
82 'sqlite_features_unittest.cc',
83 'statement_unittest.cc',
84 'transaction_unittest.cc',
[email protected]40ce1e442011-06-30 15:03:1185 ],
86 'include_dirs': [
87 '..',
88 ],
89 'conditions': [
[email protected]073bef82012-07-24 18:03:4790 ['os_posix==1 and OS!="mac" and OS!="ios"', {
[email protected]40ce1e442011-06-30 15:03:1191 'conditions': [
92 ['linux_use_tcmalloc==1', {
93 'dependencies': [
94 '../base/allocator/allocator.gyp:allocator',
95 ],
96 }],
97 ],
98 }],
[email protected]3e1d8c82012-05-31 04:36:0399 ['OS == "android" and gtest_target_type == "shared_library"', {
100 'dependencies': [
101 '../testing/android/native_test.gyp:native_test_native_code',
102 ],
103 }],
[email protected]40ce1e442011-06-30 15:03:11104 ],
[email protected]4be31d42013-01-11 18:47:53105 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
106 'msvs_disabled_warnings': [4267, ],
[email protected]40ce1e442011-06-30 15:03:11107 },
108 ],
[email protected]3e1d8c82012-05-31 04:36:03109 'conditions': [
110 # Special target to wrap a gtest_target_type==shared_library
111 # sql_unittests into an android apk for execution.
112 ['OS == "android" and gtest_target_type == "shared_library"', {
113 'targets': [
114 {
115 'target_name': 'sql_unittests_apk',
116 'type': 'none',
117 'dependencies': [
[email protected]3e1d8c82012-05-31 04:36:03118 'sql_unittests',
119 ],
120 'variables': {
121 'test_suite_name': 'sql_unittests',
122 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)sql_unittests<(SHARED_LIB_SUFFIX)',
[email protected]3e1d8c82012-05-31 04:36:03123 },
124 'includes': [ '../build/apk_test.gypi' ],
125 },
126 ],
127 }],
128 ],
[email protected]40ce1e442011-06-30 15:03:11129}