@@ -39,6 +39,34 @@ libtorch_generated_sources = [
3939 "torch/csrc/autograd/VariableTypeManual.cpp" ,
4040]
4141
42+ # copied from https://github.com/pytorch/pytorch/blob/master/aten/src/ATen/core/CMakeLists.txt
43+ jit_core_headers = [
44+ "torch/csrc/utils/memory.h" ,
45+ "torch/csrc/WindowsTorchApiMacro.h" ,
46+ "torch/csrc/jit/frontend/source_range.h" ,
47+ "torch/csrc/jit/serialization/source_range_serialization.h" ,
48+ "torch/csrc/jit/frontend/lexer.h" ,
49+ "torch/csrc/jit/frontend/strtod.h" ,
50+ "torch/csrc/jit/frontend/parser_constants.h" ,
51+ "torch/csrc/jit/frontend/function_schema_parser.h" ,
52+ "torch/csrc/jit/frontend/parse_string_literal.h" ,
53+ "torch/csrc/jit/frontend/schema_type_parser.h" ,
54+ "torch/csrc/jit/frontend/error_report.h" ,
55+ "torch/csrc/jit/frontend/tree.h" ,
56+ "torch/custom_class.h" ,
57+ "torch/custom_class_detail.h" ,
58+ "torch/library.h" ,
59+ ]
60+
61+ jit_core_sources = [
62+ "torch/csrc/jit/frontend/error_report.cpp" ,
63+ "torch/csrc/jit/frontend/function_schema_parser.cpp" ,
64+ "torch/csrc/jit/frontend/lexer.cpp" ,
65+ "torch/csrc/jit/frontend/schema_type_parser.cpp" ,
66+ "torch/csrc/jit/frontend/strtod.cpp" ,
67+ "torch/csrc/jit/frontend/source_range.cpp" ,
68+ ]
69+
4270# copied from https://github.com/pytorch/pytorch/blob/master/tools/cpp_build/torch/CMakeLists.txt
4371libtorch_core_sources = [
4472 "torch/csrc/autograd/anomaly_mode.cpp" ,
@@ -238,7 +266,6 @@ libtorch_core_jit_sources = [
238266
239267libtorch_cmake_sources = libtorch_core_sources + libtorch_core_jit_sources
240268
241-
242269libtorch_extra_sources = libtorch_core_jit_sources + [
243270 "torch/csrc/autograd/VariableTypeManual.cpp" ,
244271 "torch/csrc/jit/api/module_save.cpp" ,
0 commit comments