[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] | d452696 | 2011-11-10 21:40:28 | [diff] [blame] | 17 | 'defines': [ 'SQL_IMPLEMENTATION' ], |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 18 | 'sources': [ |
[email protected] | f0a54b2 | 2011-07-19 18:40:21 | [diff] [blame] | 19 | 'connection.cc', |
| 20 | 'connection.h', |
| 21 | 'diagnostic_error_delegate.h', |
| 22 | 'init_status.h', |
| 23 | 'meta_table.cc', |
| 24 | 'meta_table.h', |
| 25 | 'statement.cc', |
| 26 | 'statement.h', |
| 27 | 'transaction.cc', |
| 28 | 'transaction.h', |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 29 | ], |
| 30 | }, |
| 31 | { |
| 32 | 'target_name': 'sql_unittests', |
[email protected] | 3e1d8c8 | 2012-05-31 04:36:03 | [diff] [blame] | 33 | 'type': '<(gtest_target_type)', |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 34 | 'dependencies': [ |
| 35 | 'sql', |
| 36 | '../base/base.gyp:test_support_base', |
| 37 | '../testing/gtest.gyp:gtest', |
| 38 | ], |
| 39 | 'sources': [ |
[email protected] | f0a54b2 | 2011-07-19 18:40:21 | [diff] [blame] | 40 | 'run_all_unittests.cc', |
| 41 | 'connection_unittest.cc', |
| 42 | 'sqlite_features_unittest.cc', |
| 43 | 'statement_unittest.cc', |
| 44 | 'transaction_unittest.cc', |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 45 | ], |
| 46 | 'include_dirs': [ |
| 47 | '..', |
| 48 | ], |
| 49 | 'conditions': [ |
[email protected] | 073bef8 | 2012-07-24 18:03:47 | [diff] [blame^] | 50 | ['os_posix==1 and OS!="mac" and OS!="ios"', { |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 51 | 'conditions': [ |
| 52 | ['linux_use_tcmalloc==1', { |
| 53 | 'dependencies': [ |
| 54 | '../base/allocator/allocator.gyp:allocator', |
| 55 | ], |
| 56 | }], |
| 57 | ], |
| 58 | }], |
[email protected] | 3e1d8c8 | 2012-05-31 04:36:03 | [diff] [blame] | 59 | ['OS == "android" and gtest_target_type == "shared_library"', { |
| 60 | 'dependencies': [ |
| 61 | '../testing/android/native_test.gyp:native_test_native_code', |
| 62 | ], |
| 63 | }], |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 64 | ], |
| 65 | }, |
| 66 | ], |
[email protected] | 3e1d8c8 | 2012-05-31 04:36:03 | [diff] [blame] | 67 | 'conditions': [ |
| 68 | # Special target to wrap a gtest_target_type==shared_library |
| 69 | # sql_unittests into an android apk for execution. |
| 70 | ['OS == "android" and gtest_target_type == "shared_library"', { |
| 71 | 'targets': [ |
| 72 | { |
| 73 | 'target_name': 'sql_unittests_apk', |
| 74 | 'type': 'none', |
| 75 | 'dependencies': [ |
| 76 | '../base/base.gyp:base_java', |
| 77 | 'sql_unittests', |
| 78 | ], |
| 79 | 'variables': { |
| 80 | 'test_suite_name': 'sql_unittests', |
| 81 | 'input_shlib_path': '<(SHARED_LIB_DIR)/<(SHARED_LIB_PREFIX)sql_unittests<(SHARED_LIB_SUFFIX)', |
| 82 | 'input_jars_paths': [ '<(PRODUCT_DIR)/lib.java/chromium_base.jar', ], |
| 83 | }, |
| 84 | 'includes': [ '../build/apk_test.gypi' ], |
| 85 | }, |
| 86 | ], |
| 87 | }], |
| 88 | ], |
[email protected] | 40ce1e44 | 2011-06-30 15:03:11 | [diff] [blame] | 89 | } |