# Copyright (C) 2018. Huawei Technologies Co., Ltd. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. config("gtest_private_config") { visibility = [ ":*" ] include_dirs = [ "googletest" ] } config("gtest_private_config_rtti") { visibility = [ ":*" ] include_dirs = [ "googletest" ] cflags = [ "-frtti" ] cflags_objcc = [ "-frtti" ] cflags_cc = [ "-frtti" ] } config("gtest_config") { include_dirs = [ "googletest/include" ] if (is_mingw) { cflags_cc = [ "-Wno-unused-const-variable", "-Wno-unused-private-field", ] } } sources_files = [ "googletest/include/gtest/gtest-death-test.h", "googletest/include/gtest/gtest-matchers.h", "googletest/include/gtest/gtest-message.h", "googletest/include/gtest/gtest-param-test.h", "googletest/include/gtest/gtest-printers.h", "googletest/include/gtest/gtest-test-part.h", "googletest/include/gtest/gtest-typed-test.h", "googletest/include/gtest/gtest_pred_impl.h", "googletest/include/gtest/gtest_prod.h", "googletest/include/gtest/hwext/gtest-ext.h", "googletest/include/gtest/hwext/gtest-filter.h", "googletest/include/gtest/hwext/gtest-multithread.h", "googletest/include/gtest/hwext/gtest-tag.h", "googletest/include/gtest/hwext/utils.h", "googletest/include/gtest/internal/custom/gtest-port.h", "googletest/include/gtest/internal/custom/gtest-printers.h", "googletest/include/gtest/internal/custom/gtest.h", "googletest/include/gtest/internal/gtest-death-test-internal.h", "googletest/include/gtest/internal/gtest-filepath.h", "googletest/include/gtest/internal/gtest-internal.h", "googletest/include/gtest/internal/gtest-param-util.h", "googletest/include/gtest/internal/gtest-port-arch.h", "googletest/include/gtest/internal/gtest-port.h", "googletest/include/gtest/internal/gtest-string.h", "googletest/include/gtest/internal/gtest-type-util.h", "googletest/src/gtest-all.cc", "googletest/src/gtest-death-test.cc", "googletest/src/gtest-filepath.cc", "googletest/src/gtest-internal-inl.h", "googletest/src/gtest-matchers.cc", "googletest/src/gtest-port.cc", "googletest/src/gtest-printers.cc", "googletest/src/gtest-test-part.cc", "googletest/src/gtest-typed-test.cc", "googletest/src/gtest.cc", "googletest/src/hwext/gtest-ext.cc", "googletest/src/hwext/gtest-filter.cc", "googletest/src/hwext/gtest-multithread.cpp", "googletest/src/hwext/gtest-tag.cc", "googletest/src/hwext/gtest-utils.cc", ] static_library("gtest") { testonly = true public = [ "googletest/include/gtest/gtest-spi.h", "googletest/include/gtest/gtest.h", ] sources = sources_files sources -= [ "googletest/src/gtest-all.cc" ] public_configs = [ ":gtest_config" ] configs += [ ":gtest_private_config" ] configs -= [ "//build/config/coverage:default_coverage" ] } static_library("gtest_rtti") { testonly = true public = [ "googletest/include/gtest/gtest-spi.h", "googletest/include/gtest/gtest.h", ] sources = sources_files sources -= [ "googletest/src/gtest-all.cc" ] public_configs = [ ":gtest_config" ] configs += [ ":gtest_private_config_rtti" ] configs -= [ "//build/config/coverage:default_coverage" ] } static_library("gtest_main") { testonly = true sources = [ "googletest/src/gtest_main.cc" ] public_deps = [ ":gtest" ] configs -= [ "//build/config/coverage:default_coverage" ] } config("gmock_private_config") { visibility = [ ":*" ] include_dirs = [ "googlemock" ] } config("gmock_config") { include_dirs = [ "googlemock/include" ] cflags_cc = [ # The MOCK_METHODn() macros do not specify "override", which triggers this # warning in users: "error: 'Method' overrides a member function but is not # marked 'override' [-Werror,-Winconsistent-missing-override]". Suppress # these warnings until https://github.com/google/googletest/issues/533 is # fixed. "-Wno-inconsistent-missing-override", ] } static_library("gmock") { testonly = true public = [ "googlemock/include/gmock/gmock.h" ] sources = [ "googlemock/include/gmock/gmock-actions.h", "googlemock/include/gmock/gmock-cardinalities.h", "googlemock/include/gmock/gmock-function-mocker.h", "googlemock/include/gmock/gmock-matchers.h", "googlemock/include/gmock/gmock-more-actions.h", "googlemock/include/gmock/gmock-more-matchers.h", "googlemock/include/gmock/gmock-nice-strict.h", "googlemock/include/gmock/gmock-spec-builders.h", "googlemock/include/gmock/internal/custom/gmock-generated-actions.h", "googlemock/include/gmock/internal/custom/gmock-matchers.h", "googlemock/include/gmock/internal/custom/gmock-port.h", "googlemock/include/gmock/internal/gmock-internal-utils.h", "googlemock/include/gmock/internal/gmock-port.h", "googlemock/include/gmock/internal/gmock-pp.h", "googlemock/src/gmock-all.cc", "googlemock/src/gmock-cardinalities.cc", "googlemock/src/gmock-internal-utils.cc", "googlemock/src/gmock-matchers.cc", "googlemock/src/gmock-spec-builders.cc", "googlemock/src/gmock.cc", ] sources -= [ "googlemock/src/gmock-all.cc" ] public_configs = [ ":gmock_config" ] configs += [ ":gmock_private_config" ] configs -= [ "//build/config/coverage:default_coverage" ] deps = [ ":gtest" ] } static_library("gmock_main") { testonly = true sources = [ "googlemock/src/gmock_main.cc" ] public_deps = [ ":gmock", ":gtest", ] configs -= [ "//build/config/coverage:default_coverage" ] }