13f085823Sopenharmony_ci# Copyright (c) 2020 Huawei Device Co., Ltd.
23f085823Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
33f085823Sopenharmony_ci# you may not use this file except in compliance with the License.
43f085823Sopenharmony_ci# You may obtain a copy of the License at
53f085823Sopenharmony_ci#
63f085823Sopenharmony_ci#     http://www.apache.org/licenses/LICENSE-2.0
73f085823Sopenharmony_ci#
83f085823Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
93f085823Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
103f085823Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
113f085823Sopenharmony_ci# See the License for the specific language governing permissions and
123f085823Sopenharmony_ci# limitations under the License.
133f085823Sopenharmony_ci
143f085823Sopenharmony_ciconfig("gtest_private_config") {
153f085823Sopenharmony_ci  visibility = [ ":*" ]
163f085823Sopenharmony_ci  include_dirs = [ "//third_party/googletest/googletest" ]
173f085823Sopenharmony_ci}
183f085823Sopenharmony_ci
193f085823Sopenharmony_ciconfig("gtest_config") {
203f085823Sopenharmony_ci  include_dirs = [ "//third_party/googletest/googletest/include" ]
213f085823Sopenharmony_ci  cflags = [ "-std=c++17" ]
223f085823Sopenharmony_ci  cflags_objcc = [ "-std=c++17" ]
233f085823Sopenharmony_ci  cflags_cc = [ "-std=c++17" ]
243f085823Sopenharmony_ci}
253f085823Sopenharmony_ci
263f085823Sopenharmony_cistatic_library("gtest") {
273f085823Sopenharmony_ci  #testonly = true
283f085823Sopenharmony_ci  public = [
293f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/gtest-spi.h",
303f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/gtest.h",
313f085823Sopenharmony_ci  ]
323f085823Sopenharmony_ci  sources = [
333f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/gtest-death-test.h",
343f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/gtest-message.h",
353f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/gtest-param-test.h",
363f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/gtest-printers.h",
373f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/gtest-test-part.h",
383f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/gtest-typed-test.h",
393f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/gtest_pred_impl.h",
403f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/gtest_prod.h",
413f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/hwext/gtest-ext.h",
423f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/hwext/gtest-filter.h",
433f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/hwext/gtest-tag.h",
443f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/hwext/utils.h",
453f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/internal/custom/gtest-port.h",
463f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/internal/custom/gtest-printers.h",
473f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/internal/custom/gtest.h",
483f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/internal/gtest-death-test-internal.h",
493f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/internal/gtest-filepath.h",
503f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/internal/gtest-internal.h",
513f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/internal/gtest-linked_ptr.h",
523f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/internal/gtest-param-util-generated.h",
533f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/internal/gtest-param-util.h",
543f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/internal/gtest-port-arch.h",
553f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/internal/gtest-port.h",
563f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/internal/gtest-string.h",
573f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/internal/gtest-tuple.h",
583f085823Sopenharmony_ci    "//third_party/googletest/googletest/include/gtest/internal/gtest-type-util.h",
593f085823Sopenharmony_ci    "//third_party/googletest/googletest/src/gtest-assertion-result.cc",
603f085823Sopenharmony_ci    "//third_party/googletest/googletest/src/gtest-death-test.cc",
613f085823Sopenharmony_ci    "//third_party/googletest/googletest/src/gtest-filepath.cc",
623f085823Sopenharmony_ci    "//third_party/googletest/googletest/src/gtest-internal-inl.h",
633f085823Sopenharmony_ci    "//third_party/googletest/googletest/src/gtest-port.cc",
643f085823Sopenharmony_ci    "//third_party/googletest/googletest/src/gtest-printers.cc",
653f085823Sopenharmony_ci    "//third_party/googletest/googletest/src/gtest-test-part.cc",
663f085823Sopenharmony_ci    "//third_party/googletest/googletest/src/gtest-typed-test.cc",
673f085823Sopenharmony_ci    "//third_party/googletest/googletest/src/gtest.cc",
683f085823Sopenharmony_ci    "//third_party/googletest/googletest/src/hwext/gtest-ext.cc",
693f085823Sopenharmony_ci    "//third_party/googletest/googletest/src/hwext/gtest-filter.cc",
703f085823Sopenharmony_ci    "//third_party/googletest/googletest/src/hwext/gtest-tag.cc",
713f085823Sopenharmony_ci    "//third_party/googletest/googletest/src/hwext/gtest-utils.cc",
723f085823Sopenharmony_ci  ]
733f085823Sopenharmony_ci  public_configs = [ ":gtest_config" ]
743f085823Sopenharmony_ci  configs += [ ":gtest_private_config" ]
753f085823Sopenharmony_ci  defines = [ "GTEST_HAS_CLONE=0" ]
763f085823Sopenharmony_ci}
773f085823Sopenharmony_ci
783f085823Sopenharmony_cistatic_library("gtest_main") {
793f085823Sopenharmony_ci  #testonly = true
803f085823Sopenharmony_ci  sources = [ "//third_party/googletest/googletest/src/gtest_main.cc" ]
813f085823Sopenharmony_ci  public_deps = [ ":gtest" ]
823f085823Sopenharmony_ci}
83