[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 1 | # Copyright (c) 2009 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 | |
| 5 | { |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 6 | 'targets': [ |
| 7 | { |
| 8 | 'target_name': 'gtest', |
[email protected] | 653bd5f03 | 2009-04-08 12:55:49 | [diff] [blame] | 9 | 'type': '<(library)', |
[email protected] | 25a3afa | 2009-03-11 00:10:36 | [diff] [blame] | 10 | 'msvs_guid': 'BFE8E2A7-3B3B-43B0-A994-3058B852DB8B', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 11 | 'sources': [ |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 12 | 'gtest/include/gtest/gtest-death-test.h', |
| 13 | 'gtest/include/gtest/gtest-message.h', |
| 14 | 'gtest/include/gtest/gtest-param-test.h', |
[email protected] | eac1cd26 | 2010-09-16 19:50:59 | [diff] [blame] | 15 | 'gtest/include/gtest/gtest-printers.h', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 16 | 'gtest/include/gtest/gtest-spi.h', |
| 17 | 'gtest/include/gtest/gtest-test-part.h', |
| 18 | 'gtest/include/gtest/gtest-typed-test.h', |
| 19 | 'gtest/include/gtest/gtest.h', |
| 20 | 'gtest/include/gtest/gtest_pred_impl.h', |
| 21 | 'gtest/include/gtest/gtest_prod.h', |
[email protected] | 22015c33 | 2009-06-22 18:32:21 | [diff] [blame] | 22 | 'gtest/include/gtest/internal/gtest-death-test-internal.h', |
| 23 | 'gtest/include/gtest/internal/gtest-filepath.h', |
| 24 | 'gtest/include/gtest/internal/gtest-internal.h', |
| 25 | 'gtest/include/gtest/internal/gtest-linked_ptr.h', |
| 26 | 'gtest/include/gtest/internal/gtest-param-util-generated.h', |
| 27 | 'gtest/include/gtest/internal/gtest-param-util.h', |
| 28 | 'gtest/include/gtest/internal/gtest-port.h', |
| 29 | 'gtest/include/gtest/internal/gtest-string.h', |
| 30 | 'gtest/include/gtest/internal/gtest-tuple.h', |
| 31 | 'gtest/include/gtest/internal/gtest-type-util.h', |
| 32 | 'gtest/src/gtest-all.cc', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 33 | 'gtest/src/gtest-death-test.cc', |
| 34 | 'gtest/src/gtest-filepath.cc', |
| 35 | 'gtest/src/gtest-internal-inl.h', |
| 36 | 'gtest/src/gtest-port.cc', |
[email protected] | eac1cd26 | 2010-09-16 19:50:59 | [diff] [blame] | 37 | 'gtest/src/gtest-printers.cc', |
[email protected] | 22015c33 | 2009-06-22 18:32:21 | [diff] [blame] | 38 | 'gtest/src/gtest-test-part.cc', |
| 39 | 'gtest/src/gtest-typed-test.cc', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 40 | 'gtest/src/gtest.cc', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 41 | 'multiprocess_func_list.cc', |
| 42 | 'multiprocess_func_list.h', |
| 43 | 'platform_test.h', |
| 44 | ], |
[email protected] | 22015c33 | 2009-06-22 18:32:21 | [diff] [blame] | 45 | 'sources!': [ |
| 46 | 'gtest/src/gtest-all.cc', # Not needed by our build. |
| 47 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 48 | 'include_dirs': [ |
| 49 | 'gtest', |
| 50 | 'gtest/include', |
| 51 | ], |
| 52 | 'conditions': [ |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 53 | ['OS == "mac"', { |
| 54 | 'sources': [ |
[email protected] | ecebcc9 | 2010-08-06 02:39:26 | [diff] [blame] | 55 | 'gtest_mac.h', |
| 56 | 'gtest_mac.mm', |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 57 | 'platform_test_mac.mm' |
| 58 | ], |
[email protected] | c77043fc | 2009-08-20 22:37:59 | [diff] [blame] | 59 | 'link_settings': { |
| 60 | 'libraries': [ |
| 61 | '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', |
| 62 | ], |
| 63 | }, |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 64 | }], |
[email protected] | 60b2c07 | 2010-02-04 04:19:35 | [diff] [blame] | 65 | ['OS == "mac" or OS == "linux" or OS == "freebsd" or OS == "openbsd"', { |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 66 | 'defines': [ |
| 67 | # gtest isn't able to figure out when RTTI is disabled for gcc |
| 68 | # versions older than 4.3.2, and assumes it's enabled. Our Mac |
| 69 | # and Linux builds disable RTTI, and cannot guarantee that the |
| 70 | # compiler will be 4.3.2. or newer. The Mac, for example, uses |
| 71 | # 4.2.1 as that is the latest available on that platform. gtest |
| 72 | # must be instructed that RTTI is disabled here, and for any |
| 73 | # direct dependents that might include gtest headers. |
| 74 | 'GTEST_HAS_RTTI=0', |
| 75 | ], |
| 76 | 'direct_dependent_settings': { |
| 77 | 'defines': [ |
| 78 | 'GTEST_HAS_RTTI=0', |
| 79 | ], |
| 80 | }, |
| 81 | }], |
[email protected] | 58680ce | 2010-09-18 00:09:15 | [diff] [blame] | 82 | ['clang==1', { |
| 83 | # We want gtest features that use tr1::tuple, but clang currently |
| 84 | # doesn't support the variadic templates used by libstdc++'s |
| 85 | # implementation. gtest supports this scenario by providing its |
| 86 | # own implementation but we must opt in to it. |
| 87 | 'defines': [ |
| 88 | 'GTEST_USE_OWN_TR1_TUPLE=1', |
| 89 | ], |
| 90 | 'direct_dependent_settings': { |
| 91 | 'defines': [ |
| 92 | 'GTEST_USE_OWN_TR1_TUPLE=1', |
| 93 | ], |
| 94 | }, |
| 95 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 96 | ], |
| 97 | 'direct_dependent_settings': { |
| 98 | 'defines': [ |
| 99 | 'UNIT_TEST', |
| 100 | ], |
| 101 | 'include_dirs': [ |
[email protected] | 5290aaa | 2009-05-28 06:02:56 | [diff] [blame] | 102 | 'gtest/include', # So that gtest headers can find themselves. |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 103 | ], |
| 104 | 'target_conditions': [ |
[email protected] | 8855583 | 2010-12-17 16:04:03 | [diff] [blame^] | 105 | ['_type=="executable"', { |
| 106 | 'test': 1, |
| 107 | 'conditions': [ |
| 108 | ['OS=="mac"', { |
| 109 | 'run_as': { |
| 110 | 'action????': ['${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}'], |
| 111 | }, |
| 112 | }], |
| 113 | ['OS=="win"', { |
| 114 | 'run_as': { |
| 115 | 'action????': ['$(TargetPath)', '--gtest_print_time'], |
| 116 | }, |
| 117 | }], |
| 118 | ], |
| 119 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 120 | ], |
[email protected] | c836d7a0 | 2009-10-03 20:47:21 | [diff] [blame] | 121 | 'msvs_disabled_warnings': [4800], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 122 | }, |
| 123 | }, |
[email protected] | 4b0f963 | 2009-05-06 19:13:06 | [diff] [blame] | 124 | { |
[email protected] | 016498e | 2010-12-03 00:59:23 | [diff] [blame] | 125 | 'target_name': 'gtest_main', |
[email protected] | 4b0f963 | 2009-05-06 19:13:06 | [diff] [blame] | 126 | 'type': '<(library)', |
| 127 | 'dependencies': [ |
| 128 | 'gtest', |
| 129 | ], |
| 130 | 'sources': [ |
| 131 | 'gtest/src/gtest_main.cc', |
| 132 | ], |
| 133 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 134 | ], |
| 135 | } |
[email protected] | f5c990c | 2009-10-06 03:02:38 | [diff] [blame] | 136 | |
| 137 | # Local Variables: |
| 138 | # tab-width:2 |
| 139 | # indent-tabs-mode:nil |
| 140 | # End: |
| 141 | # vim: set expandtab tabstop=2 shiftwidth=2: |