133 lines
5.4 KiB
Plaintext
Raw Normal View History

# Copyright 2017 The Crashpad Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
config("gtest_private_config") {
visibility = [ ":*" ]
include_dirs = [ "gtest/googletest" ]
defines = [ "GUNIT_NO_GOOGLE3=1" ]
}
config("gtest_public_config") {
include_dirs = [ "gtest/googletest/include" ]
}
static_library("gtest") {
sources = [
"gtest/googletest/include/gtest/gtest-death-test.h",
"gtest/googletest/include/gtest/gtest-message.h",
"gtest/googletest/include/gtest/gtest-param-test.h",
"gtest/googletest/include/gtest/gtest-printers.h",
"gtest/googletest/include/gtest/gtest-spi.h",
"gtest/googletest/include/gtest/gtest-test-part.h",
"gtest/googletest/include/gtest/gtest-typed-test.h",
"gtest/googletest/include/gtest/gtest.h",
"gtest/googletest/include/gtest/gtest_pred_impl.h",
"gtest/googletest/include/gtest/gtest_prod.h",
"gtest/googletest/include/gtest/internal/custom/gtest-port.h",
"gtest/googletest/include/gtest/internal/custom/gtest-printers.h",
"gtest/googletest/include/gtest/internal/custom/gtest.h",
"gtest/googletest/include/gtest/internal/gtest-death-test-internal.h",
"gtest/googletest/include/gtest/internal/gtest-filepath.h",
"gtest/googletest/include/gtest/internal/gtest-internal.h",
"gtest/googletest/include/gtest/internal/gtest-linked_ptr.h",
"gtest/googletest/include/gtest/internal/gtest-param-util-generated.h",
"gtest/googletest/include/gtest/internal/gtest-param-util.h",
"gtest/googletest/include/gtest/internal/gtest-port-arch.h",
"gtest/googletest/include/gtest/internal/gtest-port.h",
"gtest/googletest/include/gtest/internal/gtest-string.h",
"gtest/googletest/include/gtest/internal/gtest-tuple.h",
"gtest/googletest/include/gtest/internal/gtest-type-util.h",
"gtest/googletest/src/gtest-all.cc",
"gtest/googletest/src/gtest-death-test.cc",
"gtest/googletest/src/gtest-filepath.cc",
"gtest/googletest/src/gtest-internal-inl.h",
"gtest/googletest/src/gtest-port.cc",
"gtest/googletest/src/gtest-printers.cc",
"gtest/googletest/src/gtest-test-part.cc",
"gtest/googletest/src/gtest-typed-test.cc",
"gtest/googletest/src/gtest.cc",
]
sources -= [ "gtest/googletest/src/gtest-all.cc" ]
configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
configs += [ ":gtest_private_config" ]
public_configs = [ ":gtest_public_config" ]
}
config("gmock_private_config") {
visibility = [ ":*" ]
include_dirs = [ "gtest/googlemock" ]
}
config("gmock_public_config") {
include_dirs = [ "gtest/googlemock/include" ]
# 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, and add -Wno-unknown-warning-option because only recent
# versions of clang (trunk r220703 and later, version
# 3.6 and later) recognize it.
if (is_clang) {
cflags_cc = [
"-Wno-inconsistent-missing-override",
"-Wno-unknown-warning-option",
]
}
}
static_library("gmock") {
sources = [
"gtest/googlemock/include/gmock/gmock-actions.h",
"gtest/googlemock/include/gmock/gmock-cardinalities.h",
"gtest/googlemock/include/gmock/gmock-generated-actions.h",
"gtest/googlemock/include/gmock/gmock-generated-function-mockers.h",
"gtest/googlemock/include/gmock/gmock-generated-matchers.h",
"gtest/googlemock/include/gmock/gmock-generated-nice-strict.h",
"gtest/googlemock/include/gmock/gmock-matchers.h",
"gtest/googlemock/include/gmock/gmock-more-actions.h",
"gtest/googlemock/include/gmock/gmock-more-matchers.h",
"gtest/googlemock/include/gmock/gmock-spec-builders.h",
"gtest/googlemock/include/gmock/gmock.h",
"gtest/googlemock/include/gmock/internal/custom/gmock-generated-actions.h",
"gtest/googlemock/include/gmock/internal/custom/gmock-matchers.h",
"gtest/googlemock/include/gmock/internal/custom/gmock-port.h",
"gtest/googlemock/include/gmock/internal/gmock-generated-internal-utils.h",
"gtest/googlemock/include/gmock/internal/gmock-internal-utils.h",
"gtest/googlemock/include/gmock/internal/gmock-port.h",
"gtest/googlemock/src/gmock-all.cc",
"gtest/googlemock/src/gmock-cardinalities.cc",
"gtest/googlemock/src/gmock-internal-utils.cc",
"gtest/googlemock/src/gmock-matchers.cc",
"gtest/googlemock/src/gmock-spec-builders.cc",
"gtest/googlemock/src/gmock.cc",
]
sources -= [ "gtest/googlemock/src/gmock-all.cc" ]
deps = [
":gtest",
]
configs -= [ "//third_party/mini_chromium/mini_chromium/build:Wexit_time_destructors" ]
configs += [ ":gmock_private_config" ]
public_configs = [ ":gmock_public_config" ]
}
static_library("gmock_main") {
sources = [
"gtest/googlemock/src/gmock_main.cc",
]
deps = [
":gmock",
":gtest",
]
}