Move qnnpack to shared BUCK build (#80260)

Differential Revision: D37434340

Pull Request resolved: https://github.com/pytorch/pytorch/pull/80260
Approved by: https://github.com/larryliu0820, https://github.com/malfet
This commit is contained in:
Linbin Yu
2022-06-29 22:40:36 +00:00
committed by PyTorch MergeBot
parent c1fa9fdff9
commit edf76cd9c2
7 changed files with 746 additions and 143 deletions

70
third_party/BUCK.oss vendored
View File

@ -330,3 +330,73 @@ cxx_binary(
visibility = ["PUBLIC"],
deps = [":flatc_library"],
)
cxx_library(
name = "gtest_headers",
exported_preprocessor_flags = [
"-DGTEST_USE_OWN_TR1_TUPLE=0",
"-DGTEST_HAS_TR1_TUPLE=0",
"-D_CRT_DECLARE_NONSTDC_NAMES",
"-D_CRT_NONSTDC_NO_WARNINGS",
"-D_CRT_NONSTDC_NO_DEPRECATE",
],
include_directories = [
"googletest/googletest",
],
public_system_include_directories = [
"googletest/googletest/include",
],
raw_headers = glob([
"googletest/googletest/src/**/*.h",
"googletest/googletest/include/**/*.h",
]),
visibility = [
"PUBLIC",
],
)
cxx_library(
name = "gtest",
srcs = [
"googletest/googletest/src/gtest-all.cc",
"googletest/googletest/src/gtest_main.cc",
],
include_directories = [
"googletest/googletest",
],
raw_headers = glob([
"googletest/googletest/src/**/*.cc",
"googletest/googletest/src/**/*.h",
]),
visibility = [
"PUBLIC",
],
xcode_public_headers_symlinks = True,
exported_deps = [
":gtest_headers",
],
)
cxx_library(
name = "gmock",
srcs = [
"googletest/googlemock/src/gmock-all.cc",
],
include_directories = [
"googletest/googlemock",
],
public_system_include_directories = [
"googletest/googlemock/include",
],
raw_headers = glob([
"googletest/googlemock/include/**/*.h",
"googletest/googlemock/src/**/*.cc",
]),
visibility = ["PUBLIC"],
deps = [
":gtest",
],
exported_deps = [
":gtest_headers",
],
)