OLD | NEW |
(Empty) | |
| 1 # Copyright (c) 2013 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 config("gtest_config") { |
| 6 defines = [ |
| 7 "UNIT_TEST", |
| 8 |
| 9 # In order to allow regex matches in gtest to be shared between Windows |
| 10 # and other systems, we tell gtest to always use it's internal engine. |
| 11 "GTEST_HAS_POSIX_RE=0", |
| 12 ] |
| 13 |
| 14 # Gtest headers need to be able to find themselves. |
| 15 include_dirs = [ "include" ] |
| 16 |
| 17 if (is_win) { |
| 18 cflags = [ "/wd4800" ] # Unused variable warning. |
| 19 } |
| 20 |
| 21 if (is_posix) { |
| 22 defines += [ |
| 23 # gtest isn't able to figure out when RTTI is disabled for gcc |
| 24 # versions older than 4.3.2, and assumes it's enabled. Our Mac |
| 25 # and Linux builds disable RTTI, and cannot guarantee that the |
| 26 # compiler will be 4.3.2. or newer. The Mac, for example, uses |
| 27 # 4.2.1 as that is the latest available on that platform. gtest |
| 28 # must be instructed that RTTI is disabled here, and for any |
| 29 # direct dependents that might include gtest headers. |
| 30 "GTEST_HAS_RTTI=0", |
| 31 ] |
| 32 } |
| 33 } |
| 34 |
| 35 static_library("gtest") { |
| 36 sources = [ |
| 37 "include/gtest/gtest-death-test.h", |
| 38 "include/gtest/gtest-message.h", |
| 39 "include/gtest/gtest-param-test.h", |
| 40 "include/gtest/gtest-printers.h", |
| 41 "include/gtest/gtest-spi.h", |
| 42 "include/gtest/gtest-test-part.h", |
| 43 "include/gtest/gtest-typed-test.h", |
| 44 "include/gtest/gtest.h", |
| 45 "include/gtest/gtest_pred_impl.h", |
| 46 "include/gtest/internal/gtest-death-test-internal.h", |
| 47 "include/gtest/internal/gtest-filepath.h", |
| 48 "include/gtest/internal/gtest-internal.h", |
| 49 "include/gtest/internal/gtest-linked_ptr.h", |
| 50 "include/gtest/internal/gtest-param-util-generated.h", |
| 51 "include/gtest/internal/gtest-param-util.h", |
| 52 "include/gtest/internal/gtest-port.h", |
| 53 "include/gtest/internal/gtest-string.h", |
| 54 "include/gtest/internal/gtest-tuple.h", |
| 55 "include/gtest/internal/gtest-type-util.h", |
| 56 #"gtest/src/gtest-all.cc", # Not needed by our build. |
| 57 "src/gtest-death-test.cc", |
| 58 "src/gtest-filepath.cc", |
| 59 "src/gtest-internal-inl.h", |
| 60 "src/gtest-port.cc", |
| 61 "src/gtest-printers.cc", |
| 62 "src/gtest-test-part.cc", |
| 63 "src/gtest-typed-test.cc", |
| 64 "src/gtest.cc", |
| 65 "../multiprocess_func_list.cc", |
| 66 "../multiprocess_func_list.h", |
| 67 "../platform_test.h", |
| 68 ] |
| 69 |
| 70 if (is_mac) { |
| 71 sources += [ |
| 72 "../gtest_mac.h", |
| 73 "../gtest_mac.mm", |
| 74 "../platform_test_mac.mm", |
| 75 ] |
| 76 } |
| 77 |
| 78 include_dirs = [ "." ] |
| 79 |
| 80 all_dependent_configs = [ ":gtest_config" ] |
| 81 |
| 82 configs -= [ "//build/config/compiler:chromium_code" ] |
| 83 configs += [ "//build/config/compiler:no_chromium_code" ] |
| 84 } |
OLD | NEW |