Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 # Copyright 2014 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 visibility = [ ":*" ] # gmock also shares this config. | |
| 7 | |
| 8 defines = [ | |
| 9 # In order to allow regex matches in gtest to be shared between Windows | |
| 10 # and other systems, we tell gtest to always use its internal engine. | |
| 11 "GTEST_HAS_POSIX_RE=0", | |
| 12 "GTEST_LANG_CXX11=1", | |
| 13 ] | |
| 14 | |
| 15 # Gtest headers need to be able to find themselves. | |
| 16 include_dirs = [ "src/googletest/include" ] | |
| 17 | |
| 18 if (is_win) { | |
| 19 cflags = [ "/wd4800" ] # Unused variable warning. | |
| 20 } | |
| 21 } | |
| 22 | |
| 23 config("gtest_warnings") { | |
| 24 if (is_win && is_clang) { | |
| 25 # The Mutex constructor initializer list in gtest-port.cc is incorrectly | |
| 26 # ordered. See | |
| 27 # https://groups.google.com/d/msg/googletestframework/S5uSV8L2TX8/U1FaTDa6J6 sJ. | |
| 28 cflags = [ "-Wno-reorder" ] | |
| 29 } | |
| 30 } | |
| 31 | |
| 32 config("gmock_config") { | |
| 33 # Gmock headers need to be able to find themselves. | |
| 34 include_dirs = [ | |
| 35 "gmock_custom", | |
| 36 "src/googlemock/include", | |
| 37 ] | |
| 38 } | |
| 39 | |
| 40 source_set("gtest") { | |
|
Nico
2017/04/26 20:46:18
please add a comment above this saying that people
pwnall
2017/04/26 22:38:24
Done.
| |
| 41 testonly = true | |
| 42 sources = [ | |
| 43 "src/googletest/include/gtest/gtest-death-test.h", | |
| 44 "src/googletest/include/gtest/gtest-message.h", | |
| 45 "src/googletest/include/gtest/gtest-param-test.h", | |
| 46 "src/googletest/include/gtest/gtest-spi.h", | |
| 47 "src/googletest/include/gtest/gtest-test-part.h", | |
| 48 "src/googletest/include/gtest/gtest-typed-test.h", | |
| 49 "src/googletest/include/gtest/gtest.h", | |
| 50 "src/googletest/include/gtest/gtest_pred_impl.h", | |
| 51 "src/googletest/include/gtest/internal/gtest-death-test-internal.h", | |
| 52 "src/googletest/include/gtest/internal/gtest-filepath.h", | |
| 53 "src/googletest/include/gtest/internal/gtest-internal.h", | |
| 54 "src/googletest/include/gtest/internal/gtest-linked_ptr.h", | |
| 55 "src/googletest/include/gtest/internal/gtest-param-util-generated.h", | |
| 56 "src/googletest/include/gtest/internal/gtest-param-util.h", | |
| 57 "src/googletest/include/gtest/internal/gtest-port.h", | |
| 58 "src/googletest/include/gtest/internal/gtest-string.h", | |
| 59 "src/googletest/include/gtest/internal/gtest-tuple.h", | |
| 60 "src/googletest/include/gtest/internal/gtest-type-util.h", | |
| 61 "src/googletest/src/googletest/include/gtest/gtest-printers.h", | |
| 62 | |
| 63 #"src/googletest/src/gtest-all.cc", # Not needed by our build. | |
| 64 "src/googletest/src/gtest-death-test.cc", | |
| 65 "src/googletest/src/gtest-filepath.cc", | |
| 66 "src/googletest/src/gtest-internal-inl.h", | |
| 67 "src/googletest/src/gtest-port.cc", | |
| 68 "src/googletest/src/gtest-printers.cc", | |
| 69 "src/googletest/src/gtest-test-part.cc", | |
| 70 "src/googletest/src/gtest-typed-test.cc", | |
| 71 "src/googletest/src/gtest.cc", | |
| 72 ] | |
| 73 | |
| 74 # Some files include "src/gtest-internal-inl.h". | |
| 75 include_dirs = [ "src/googletest" ] | |
| 76 | |
| 77 all_dependent_configs = [ ":gtest_config" ] | |
| 78 | |
| 79 configs -= [ "//build/config/compiler:chromium_code" ] | |
| 80 configs += [ | |
| 81 "//build/config/compiler:no_chromium_code", | |
| 82 | |
| 83 # Must be after no_chromium_code for warning flags to be ordered correctly. | |
| 84 ":gtest_warnings", | |
| 85 ] | |
| 86 } | |
| 87 | |
| 88 source_set("gtest_main") { | |
| 89 testonly = true | |
| 90 sources = [ | |
| 91 "src/googletest/src/gtest_main.cc", | |
| 92 ] | |
| 93 deps = [ | |
| 94 ":gtest", | |
| 95 ] | |
| 96 } | |
| 97 | |
| 98 static_library("gmock") { | |
|
Nico
2017/04/26 20:46:18
likewise
pwnall
2017/04/26 22:38:24
Done.
| |
| 99 testonly = true | |
| 100 sources = [ | |
| 101 "src/googlemock/include/gmock/gmock-actions.h", | |
| 102 "src/googlemock/include/gmock/gmock-cardinalities.h", | |
| 103 "src/googlemock/include/gmock/gmock-generated-actions.h", | |
| 104 "src/googlemock/include/gmock/gmock-generated-function-mockers.h", | |
| 105 "src/googlemock/include/gmock/gmock-generated-matchers.h", | |
| 106 "src/googlemock/include/gmock/gmock-generated-nice-strict.h", | |
| 107 "src/googlemock/include/gmock/gmock-matchers.h", | |
| 108 "src/googlemock/include/gmock/gmock-spec-builders.h", | |
| 109 "src/googlemock/include/gmock/gmock.h", | |
| 110 "src/googlemock/include/gmock/internal/gmock-generated-internal-utils.h", | |
| 111 "src/googlemock/include/gmock/internal/gmock-internal-utils.h", | |
| 112 "src/googlemock/include/gmock/internal/gmock-port.h", | |
| 113 | |
| 114 # gmock helpers. | |
| 115 "gmock_custom/gmock/internal/custom/gmock-port.h", | |
| 116 | |
| 117 #"src/googlemock/src/gmock-all.cc", # Not needed by our build. | |
| 118 "src/googlemock/src/gmock-cardinalities.cc", | |
| 119 "src/googlemock/src/gmock-internal-utils.cc", | |
| 120 "src/googlemock/src/gmock-matchers.cc", | |
| 121 "src/googlemock/src/gmock-spec-builders.cc", | |
| 122 "src/googlemock/src/gmock.cc", | |
| 123 ] | |
| 124 | |
| 125 # This project includes some stuff form gtest's guts. | |
| 126 include_dirs = [ "src/googletest/include" ] | |
| 127 | |
| 128 public_configs = [ | |
| 129 ":gmock_config", | |
| 130 ":gtest_config", | |
| 131 ] | |
| 132 } | |
| 133 | |
| 134 static_library("gmock_main") { | |
| 135 testonly = true | |
| 136 sources = [ | |
| 137 "src/googlemock/src/gmock_main.cc", | |
| 138 ] | |
| 139 deps = [ | |
| 140 ":gmock", | |
| 141 ] | |
| 142 } | |
| OLD | NEW |