• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2020 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14config("gtest_private_config") {
15  visibility = [ ":*" ]
16  include_dirs = [ "//third_party/googletest/googletest" ]
17}
18
19config("gtest_config") {
20  include_dirs = [ "//third_party/googletest/googletest/include" ]
21  cflags = [ "-std=c++17" ]
22  cflags_objcc = [ "-std=c++17" ]
23  cflags_cc = [ "-std=c++17" ]
24}
25
26static_library("gtest") {
27  #testonly = true
28  public = [
29    "//third_party/googletest/googletest/include/gtest/gtest-spi.h",
30    "//third_party/googletest/googletest/include/gtest/gtest.h",
31  ]
32  sources = [
33    "//third_party/googletest/googletest/include/gtest/gtest-death-test.h",
34    "//third_party/googletest/googletest/include/gtest/gtest-message.h",
35    "//third_party/googletest/googletest/include/gtest/gtest-param-test.h",
36    "//third_party/googletest/googletest/include/gtest/gtest-printers.h",
37    "//third_party/googletest/googletest/include/gtest/gtest-test-part.h",
38    "//third_party/googletest/googletest/include/gtest/gtest-typed-test.h",
39    "//third_party/googletest/googletest/include/gtest/gtest_pred_impl.h",
40    "//third_party/googletest/googletest/include/gtest/gtest_prod.h",
41    "//third_party/googletest/googletest/include/gtest/hwext/gtest-ext.h",
42    "//third_party/googletest/googletest/include/gtest/hwext/gtest-filter.h",
43    "//third_party/googletest/googletest/include/gtest/hwext/gtest-tag.h",
44    "//third_party/googletest/googletest/include/gtest/hwext/utils.h",
45    "//third_party/googletest/googletest/include/gtest/internal/custom/gtest-port.h",
46    "//third_party/googletest/googletest/include/gtest/internal/custom/gtest-printers.h",
47    "//third_party/googletest/googletest/include/gtest/internal/custom/gtest.h",
48    "//third_party/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h",
49    "//third_party/googletest/googletest/include/gtest/internal/gtest-filepath.h",
50    "//third_party/googletest/googletest/include/gtest/internal/gtest-internal.h",
51    "//third_party/googletest/googletest/include/gtest/internal/gtest-linked_ptr.h",
52    "//third_party/googletest/googletest/include/gtest/internal/gtest-param-util-generated.h",
53    "//third_party/googletest/googletest/include/gtest/internal/gtest-param-util.h",
54    "//third_party/googletest/googletest/include/gtest/internal/gtest-port-arch.h",
55    "//third_party/googletest/googletest/include/gtest/internal/gtest-port.h",
56    "//third_party/googletest/googletest/include/gtest/internal/gtest-string.h",
57    "//third_party/googletest/googletest/include/gtest/internal/gtest-tuple.h",
58    "//third_party/googletest/googletest/include/gtest/internal/gtest-type-util.h",
59    "//third_party/googletest/googletest/src/gtest-assertion-result.cc",
60    "//third_party/googletest/googletest/src/gtest-death-test.cc",
61    "//third_party/googletest/googletest/src/gtest-filepath.cc",
62    "//third_party/googletest/googletest/src/gtest-internal-inl.h",
63    "//third_party/googletest/googletest/src/gtest-port.cc",
64    "//third_party/googletest/googletest/src/gtest-printers.cc",
65    "//third_party/googletest/googletest/src/gtest-test-part.cc",
66    "//third_party/googletest/googletest/src/gtest-typed-test.cc",
67    "//third_party/googletest/googletest/src/gtest.cc",
68    "//third_party/googletest/googletest/src/hwext/gtest-ext.cc",
69    "//third_party/googletest/googletest/src/hwext/gtest-filter.cc",
70    "//third_party/googletest/googletest/src/hwext/gtest-tag.cc",
71    "//third_party/googletest/googletest/src/hwext/gtest-utils.cc",
72  ]
73  public_configs = [ ":gtest_config" ]
74  configs += [ ":gtest_private_config" ]
75  defines = [ "GTEST_HAS_CLONE=0" ]
76}
77
78static_library("gtest_main") {
79  #testonly = true
80  sources = [ "//third_party/googletest/googletest/src/gtest_main.cc" ]
81  public_deps = [ ":gtest" ]
82}
83