[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] | 22015c33 | 2009-06-22 18:32:21 | [diff] [blame] | 12 | # Sources based on files in r267 of gmock. |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 13 | 'gtest/include/gtest/gtest-death-test.h', |
| 14 | 'gtest/include/gtest/gtest-message.h', |
| 15 | 'gtest/include/gtest/gtest-param-test.h', |
| 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] | 22015c33 | 2009-06-22 18:32:21 | [diff] [blame] | 37 | 'gtest/src/gtest-test-part.cc', |
| 38 | 'gtest/src/gtest-typed-test.cc', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 39 | 'gtest/src/gtest.cc', |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 40 | 'multiprocess_func_list.cc', |
| 41 | 'multiprocess_func_list.h', |
| 42 | 'platform_test.h', |
| 43 | ], |
[email protected] | 22015c33 | 2009-06-22 18:32:21 | [diff] [blame] | 44 | 'sources!': [ |
| 45 | 'gtest/src/gtest-all.cc', # Not needed by our build. |
| 46 | ], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 47 | 'include_dirs': [ |
| 48 | 'gtest', |
| 49 | 'gtest/include', |
| 50 | ], |
| 51 | 'conditions': [ |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 52 | ['OS == "mac"', { |
| 53 | 'sources': [ |
| 54 | 'platform_test_mac.mm' |
| 55 | ], |
[email protected] | c77043fc | 2009-08-20 22:37:59 | [diff] [blame] | 56 | 'link_settings': { |
| 57 | 'libraries': [ |
| 58 | '$(SDKROOT)/System/Library/Frameworks/Foundation.framework', |
| 59 | ], |
| 60 | }, |
[email protected] | 1bba09c | 2009-08-13 12:53:16 | [diff] [blame] | 61 | }], |
| 62 | ['OS == "mac" or OS == "linux"', { |
| 63 | 'defines': [ |
| 64 | # gtest isn't able to figure out when RTTI is disabled for gcc |
| 65 | # versions older than 4.3.2, and assumes it's enabled. Our Mac |
| 66 | # and Linux builds disable RTTI, and cannot guarantee that the |
| 67 | # compiler will be 4.3.2. or newer. The Mac, for example, uses |
| 68 | # 4.2.1 as that is the latest available on that platform. gtest |
| 69 | # must be instructed that RTTI is disabled here, and for any |
| 70 | # direct dependents that might include gtest headers. |
| 71 | 'GTEST_HAS_RTTI=0', |
| 72 | ], |
| 73 | 'direct_dependent_settings': { |
| 74 | 'defines': [ |
| 75 | 'GTEST_HAS_RTTI=0', |
| 76 | ], |
| 77 | }, |
| 78 | }], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 79 | ], |
| 80 | 'direct_dependent_settings': { |
| 81 | 'defines': [ |
| 82 | 'UNIT_TEST', |
| 83 | ], |
| 84 | 'include_dirs': [ |
[email protected] | 5290aaa | 2009-05-28 06:02:56 | [diff] [blame] | 85 | 'gtest/include', # So that gtest headers can find themselves. |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 86 | ], |
| 87 | 'target_conditions': [ |
| 88 | ['_type=="executable"', {'test': 1}], |
| 89 | ], |
[email protected] | c836d7a0 | 2009-10-03 20:47:21 | [diff] [blame^] | 90 | 'msvs_disabled_warnings': [4800], |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 91 | }, |
| 92 | }, |
[email protected] | 4b0f963 | 2009-05-06 19:13:06 | [diff] [blame] | 93 | { |
| 94 | # Note that calling this "gtest_main" confuses the scons build, |
| 95 | # which uses "_main" on scons files to produce special behavior. |
| 96 | 'target_name': 'gtestmain', |
| 97 | 'type': '<(library)', |
| 98 | 'dependencies': [ |
| 99 | 'gtest', |
| 100 | ], |
| 101 | 'sources': [ |
| 102 | 'gtest/src/gtest_main.cc', |
| 103 | ], |
| 104 | }, |
[email protected] | 2f80c31 | 2009-02-25 21:26:55 | [diff] [blame] | 105 | ], |
| 106 | } |