Migrate c10/macros/cmake_macros.h.in to torch/headeronly (#158035)

Summary: As above, also changes a bunch of the build files to be better

Test Plan:
internal and external CI

did run buck2 build fbcode//caffe2:torch and it succeeded

Rollback Plan:

Reviewed By: swolchok

Differential Revision: D78016591

Pull Request resolved: https://github.com/pytorch/pytorch/pull/158035
Approved by: https://github.com/swolchok
This commit is contained in:
Jane Xu
2025-07-15 19:52:53 +00:00
committed by PyTorch MergeBot
parent 250ae2531c
commit 30587195d3
20 changed files with 184 additions and 103 deletions

View File

@ -2,7 +2,7 @@ load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library", "cc_test")
load("@rules_cuda//cuda:defs.bzl", "cuda_library", "requires_cuda_enabled")
load("@rules_python//python:defs.bzl", "py_binary", "py_library")
load("@pip_deps//:requirements.bzl", "requirement")
load("@pytorch//c10/macros:cmake_configure_file.bzl", "cmake_configure_file")
load("@pytorch//torch/headeronly/macros:cmake_configure_file.bzl", "cmake_configure_file")
load("@pytorch//tools/config:defs.bzl", "if_cuda")
def _genrule(**kwds):