[email protected] | 3e1d8c8 | 2012-05-31 04:36:03 | [diff] [blame] | 1 | # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 2 | # 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] | d452696 | 2011-11-10 21:40:28 | [diff] [blame] | 12 | 'type': '<(component)', |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 13 | 'dependencies': [ |
| 14 | '../base/base.gyp:base', |
| 15 | '../third_party/sqlite/sqlite.gyp:sqlite', |
| 16 | ], |
[email protected] | 4350e32 | 2013-06-18 22:18:10 | [diff] [blame] | 17 | 'export_dependent_settings': [ |
| 18 | '../base/base.gyp:base', |
| 19 | ], |
[email protected] | d452696 | 2011-11-10 21:40:28 | [diff] [blame] | 20 | 'defines': [ 'SQL_IMPLEMENTATION' ], |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 21 | 'sources': [ |
[email protected] | f0a54b2 | 2011-07-19 18:40:21 | [diff] [blame] | 22 | 'connection.cc', |
| 23 | 'connection.h', |
[email protected] | 0d04ede | 2012-10-18 04:31:53 | [diff] [blame] | 24 | 'error_delegate_util.cc', |
| 25 | 'error_delegate_util.h', |
[email protected] | f0a54b2 | 2011-07-19 18:40:21 | [diff] [blame] | 26 | '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] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 33 | ], |
[email protected] | 4350e32 | 2013-06-18 22:18:10 | [diff] [blame] | 34 | 'include_dirs': [ |
| 35 | '..', |
| 36 | ], |
| 37 | 'direct_dependent_settings': { |
| 38 | 'include_dirs': [ |
| 39 | '..', |
| 40 | ], |
| 41 | }, |
[email protected] | 4be31d4 | 2013-01-11 18:47:53 | [diff] [blame] | 42 | # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 43 | 'msvs_disabled_warnings': [4267, ], |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 44 | }, |
| 45 | { |
[email protected] | 4350e32 | 2013-06-18 22:18:10 | [diff] [blame] | 46 | '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': [ |
[email protected] | 98cf300 | 2013-07-12 01:38:56 | [diff] [blame] | 58 | 'test/error_callback_support.cc', |
| 59 | 'test/error_callback_support.h', |
[email protected] | 4350e32 | 2013-06-18 22:18:10 | [diff] [blame] | 60 | 'test/scoped_error_ignorer.cc', |
| 61 | 'test/scoped_error_ignorer.h', |
| 62 | ], |
| 63 | 'include_dirs': [ |
| 64 | '..', |
| 65 | ], |
| 66 | 'direct_dependent_settings': { |
| 67 | 'include_dirs': [ |
| 68 | '..', |
| 69 | ], |
| 70 | }, |
| 71 | }, |
| 72 | { |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 73 | 'target_name': 'sql_unittests', |
[email protected] | 3e1d8c8 | 2012-05-31 04:36:03 | [diff] [blame] | 74 | 'type': '<(gtest_target_type)', |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 75 | 'dependencies': [ |
| 76 | 'sql', |
[email protected] | 4350e32 | 2013-06-18 22:18:10 | [diff] [blame] | 77 | 'test_support_sql', |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 78 | '../base/base.gyp:test_support_base', |
| 79 | '../testing/gtest.gyp:gtest', |
| 80 | ], |
| 81 | 'sources': [ |
[email protected] | f0a54b2 | 2011-07-19 18:40:21 | [diff] [blame] | 82 | 'run_all_unittests.cc', |
| 83 | 'connection_unittest.cc', |
| 84 | 'sqlite_features_unittest.cc', |
| 85 | 'statement_unittest.cc', |
| 86 | 'transaction_unittest.cc', |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 87 | ], |
| 88 | 'include_dirs': [ |
| 89 | '..', |
| 90 | ], |
| 91 | 'conditions': [ |
[email protected] | 073bef8 | 2012-07-24 18:03:47 | [diff] [blame] | 92 | ['os_posix==1 and OS!="mac" and OS!="ios"', { |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 93 | 'conditions': [ |
| 94 | ['linux_use_tcmalloc==1', { |
| 95 | 'dependencies': [ |
| 96 | '../base/allocator/allocator.gyp:allocator', |
| 97 | ], |
| 98 | }], |
| 99 | ], |
| 100 | }], |
[email protected] | 3e1d8c8 | 2012-05-31 04:36:03 | [diff] [blame] | 101 | ['OS == "android" and gtest_target_type == "shared_library"', { |
| 102 | 'dependencies': [ |
| 103 | '../testing/android/native_test.gyp:native_test_native_code', |
| 104 | ], |
| 105 | }], |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 106 | ], |
[email protected] | 4be31d4 | 2013-01-11 18:47:53 | [diff] [blame] | 107 | # TODO(jschuh): crbug.com/167187 fix size_t to int truncations. |
| 108 | 'msvs_disabled_warnings': [4267, ], |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 109 | }, |
| 110 | ], |
[email protected] | 3e1d8c8 | 2012-05-31 04:36:03 | [diff] [blame] | 111 | 'conditions': [ |
| 112 | # Special target to wrap a gtest_target_type==shared_library |
| 113 | # sql_unittests into an android apk for execution. |
| 114 | ['OS == "android" and gtest_target_type == "shared_library"', { |
| 115 | 'targets': [ |
| 116 | { |
| 117 | 'target_name': 'sql_unittests_apk', |
| 118 | 'type': 'none', |
| 119 | 'dependencies': [ |
[email protected] | 3e1d8c8 | 2012-05-31 04:36:03 | [diff] [blame] | 120 | 'sql_unittests', |
| 121 | ], |
| 122 | 'variables': { |
| 123 | 'test_suite_name': 'sql_unittests', |
| 124 | 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)sql_unittests<(SHARED_LIB_SUFFIX)', |
[email protected] | 3e1d8c8 | 2012-05-31 04:36:03 | [diff] [blame] | 125 | }, |
| 126 | 'includes': [ '../build/apk_test.gypi' ], |
| 127 | }, |
| 128 | ], |
| 129 | }], |
| 130 | ], |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 131 | } |