6 Star 62 Fork 92

OpenHarmony/third_party_googletest

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
BUILD.gn 6.42 KB
一键复制 编辑 原始数据 按行查看 历史
jialChen 提交于 2024-08-30 18:27 . !55
# 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" ]
cflags_cc = [
"-std=c++17",
"-Wno-float-equal",
"-Wno-sign-compare",
"-Wno-reorder-init-list",
]
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-assertion-result.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_rtti_main") { #Add gtest entry with RTTI compilation
# option
testonly = true
sources = [ "googletest/src/gtest_main.cc" ]
public_deps = [ ":gtest_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_private_config_rtti") {
visibility = [ ":*" ]
include_dirs = [ "googlemock/include" ]
cflags = [ "-frtti" ]
cflags_objcc = [ "-frtti" ]
cflags_cc = [ "-frtti" ]
}
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",
]
}
gmock_sources_files = [
"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",
]
static_library("gmock") {
testonly = true
public = [ "googlemock/include/gmock/gmock.h" ]
sources = gmock_sources_files
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_rtti") {
testonly = true
public = [ "googlemock/include/gmock/gmock.h" ]
sources = gmock_sources_files
sources -= [ "googlemock/src/gmock-all.cc" ]
public_configs = [ ":gmock_config" ]
configs += [ ":gmock_private_config_rtti" ]
configs -= [ "//build/config/coverage:default_coverage" ]
deps = [ ":gtest_rtti" ]
}
static_library("gmock_main") {
testonly = true
sources = [ "googlemock/src/gmock_main.cc" ]
public_deps = [
":gmock",
":gtest",
]
configs -= [ "//build/config/coverage:default_coverage" ]
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/openharmony/third_party_googletest.git
git@gitee.com:openharmony/third_party_googletest.git
openharmony
third_party_googletest
third_party_googletest
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385