mirror of
https://gitee.com/openharmony/arkcompiler_toolchain
synced 2024-11-23 07:30:33 +00:00
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/IANR1P 参考standalone的对应修改,注释改为英文,gtest_private_config_rtti的include_dirs = [ "$googletest_dir" ] 修改链接库的判断逻辑,和OHOS大仓保持一致,注意了命名规范 Signed-off-by: jialChen <jialiang1998@csu.edu.cn> Change-Id: Ifcf0550be0a90e953baa014b279c04fe1b6ecb91
This commit is contained in:
parent
5b040b7072
commit
b2b4348b48
@ -75,7 +75,14 @@ template("ohos_unittest") {
|
||||
deps += invoker.deps
|
||||
}
|
||||
|
||||
deps +=
|
||||
[ "//arkcompiler/toolchain/build/third_party_gn/googletest:gtest_main" ]
|
||||
# Add static link library judgment logic below
|
||||
|
||||
if (defined(invoker.rtti_compile_flag) && invoker.rtti_compile_flag) {
|
||||
deps += [ "//arkcompiler/toolchain/build/third_party_gn/googletest:gtest_rtti_main" ]
|
||||
} else {
|
||||
deps += [
|
||||
"//arkcompiler/toolchain/build/third_party_gn/googletest:gtest_main",
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ config("gtest_private_config") {
|
||||
|
||||
config("gtest_private_config_rtti") {
|
||||
visibility = [ ":*" ]
|
||||
include_dirs = [ "googletest" ]
|
||||
include_dirs = [ "$googletest_dir" ]
|
||||
cflags = [ "-frtti" ]
|
||||
cflags_objcc = [ "-frtti" ]
|
||||
cflags_cc = [ "-frtti" ]
|
||||
@ -111,6 +111,12 @@ static_library("gtest_rtti") {
|
||||
configs += [ ":gtest_private_config_rtti" ]
|
||||
}
|
||||
|
||||
static_library("gtest_rtti_main") { # ADD
|
||||
testonly = true
|
||||
sources = [ "$googletest_dir/src/gtest_main.cc" ]
|
||||
public_deps = [ ":gtest_rtti" ]
|
||||
}
|
||||
|
||||
static_library("gtest_main") {
|
||||
testonly = true
|
||||
sources = [ "$googletest_dir/src/gtest_main.cc" ]
|
||||
|
Loading…
Reference in New Issue
Block a user