exclude all generated files from torch_headers (#96956)

exclude all generated files from torch_headers

Summary:
This allows Bazel to build without having to wipe the standard CMake
build.

The standard CMake build produces generated files in the source tree,
this causes a problem because Bazel has its own way of generating
them, and then both sets of generated files conflict with each other.

Test Plan: Rely on CI.

Reviewers:

Subscribers:

Tasks:

Tags:

---
Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/pytorch/pytorch/pull/96956).
* #96957
* __->__ #96956
* #96955
Pull Request resolved: https://github.com/pytorch/pytorch/pull/96956
Approved by: https://github.com/PaliC
This commit is contained in:
mikey dagitses 2023-03-21 21:34:58 +00:00 committed by PyTorch MergeBot
parent d785d0c0a1
commit 19b5b67bc5

View file

@ -1587,10 +1587,7 @@ cc_library(
"torch/lib/libshm/*.h",
],
exclude = [
"torch/csrc/autograd/generated/VariableType.h",
"torch/csrc/autograd/generated/RegistrationDeclarations.h",
"torch/csrc/autograd/generated/variable_factories.h",
"torch/csrc/autograd/generated/Functions.h",
"torch/csrc/*/generated/*.h",
] + torch_cuda_headers,
) + GENERATED_AUTOGRAD_CPP + [":version_h"],
includes = [