Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit c83c36d

Browse files
nicolasvasilacheftynse
authored andcommitted
Stop putting generated protos in source tree
The python proto files are useless, they should not be generated. The proto files don't need to be exported to python. The legitimately generated .cc and .h files have no business living in the source tree, put them in the build tree.
1 parent 2d728cc commit c83c36d

File tree

2 files changed

+1
-12
lines changed

2 files changed

+1
-12
lines changed

.gitignore

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ __pycache__/
33
*~
44
build/*
55
docs/build/*
6-
tc/proto/*.py
7-
tc/proto/*.cc
8-
tc/proto/*.h
96
third-party/*_cache
107
third-party/llvm_sources*
118
third-party-install/*
@@ -17,8 +14,6 @@ conda
1714
*/.nfs*
1815
tensor_comprehensions.egg-info/
1916
tensor_comprehensions/version.py
20-
tensor_comprehensions/*.proto
21-
tensor_comprehensions/*_pb2.py
2217
slurm-*
2318
examples/results*
2419
*.pyc

tc/proto/CMakeLists.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,10 @@ function(tc_protobuf_generate_cpp_py output_dir srcs_var hdrs_var python_var)
5858
set(${python_var} ${${python_var}} PARENT_SCOPE)
5959
endfunction()
6060

61-
tc_protobuf_generate_cpp_py(${PROJECT_SOURCE_DIR}/tc/proto PROTO_SRCS PROTO_HDRS PROTO_PY mapping_options.proto compcache.proto)
61+
tc_protobuf_generate_cpp_py(${CMAKE_CURRENT_BINARY_DIR} PROTO_SRCS PROTO_HDRS PROTO_PY mapping_options.proto compcache.proto)
6262

6363
add_library(tc_proto SHARED ${PROTO_SRCS} ${PROTO_HDRS})
6464
target_link_libraries(tc_proto ${PROTOBUF_LIBRARIES})
6565
target_include_directories(tc_proto PUBLIC ${CMAKE_CURRENT_BINARY_DIR} ${PROTOBUF_HDRS})
6666

6767
install(TARGETS tc_proto DESTINATION lib)
68-
# "Install" to source_dir/tensor_comprehensions for easy inclusion in python
69-
# package with setuptools. Without this, setuptools is hell.
70-
install(PROGRAMS ${PROTO_PY}
71-
DESTINATION ${PROJECT_SOURCE_DIR}/tensor_comprehensions)
72-
install(PROGRAMS mapping_options.proto compcache.proto
73-
DESTINATION ${PROJECT_SOURCE_DIR}/tensor_comprehensions)

0 commit comments

Comments
 (0)