<commit_before>cmake_minimum_required(VERSION 2.6)

set (PROTO_FILES
	# ssl-vision
	messages_robocup_ssl_detection
	messages_robocup_ssl_geometry
	messages_robocup_ssl_wrapper

	# soccer
	Point
	RadioTx
	RadioRx
	SimCommand
	LogFrame
)

set (GEN_CC)
set (GEN_H)

foreach (file ${PROTO_FILES})
	set (cc_file ${file}.pb.cc)
	set (h_file ${file}.pb.h)
	set (proto_file ${file}.proto)
	
	add_custom_command(OUTPUT ${cc_file} ${h_file}
			COMMAND protoc --cpp_out=${CMAKE_CURRENT_BINARY_DIR} --proto_path=${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${proto_file}
			DEPENDS ${proto_file}
			VERBATIM
	)
	
	list (APPEND GEN_CC ${CMAKE_CURRENT_BINARY_DIR}/${cc_file})
	list (APPEND GEN_H ${CMAKE_CURRENT_BINARY_DIR}/${h_file})
endforeach()

add_custom_target(GenerateProto
	DEPENDS ${GEN_CC} ${GEN_H}
	VERBATIM
)

include_directories(${CMAKE_CURRENT_BINARY_DIR})

set(PACKET_LIBRARY packets)
add_library(${PACKET_LIBRARY} ${GEN_CC})
add_dependencies(${PACKET_LIBRARY} GenerateProto)
target_link_libraries(${PACKET_LIBRARY} protobuf)<commit_msg>Removed unnecessary dependencies in protobuf generation<commit_after>cmake_minimum_required(VERSION 2.6)

set (PROTO_FILES
	# ssl-vision
	messages_robocup_ssl_detection
	messages_robocup_ssl_geometry
	messages_robocup_ssl_wrapper

	# soccer
	Point
	RadioTx
	RadioRx
	SimCommand
	LogFrame
)

set (GEN_CC)
set (GEN_H)

foreach (file ${PROTO_FILES})
	set (cc_file ${file}.pb.cc)
	set (h_file ${file}.pb.h)
	set (proto_file ${file}.proto)
	
	add_custom_command(OUTPUT ${cc_file} ${h_file}
			COMMAND protoc --cpp_out=${CMAKE_CURRENT_BINARY_DIR} --proto_path=${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${proto_file}
			DEPENDS ${proto_file}
			VERBATIM
	)
	
	list (APPEND GEN_CC ${CMAKE_CURRENT_BINARY_DIR}/${cc_file})
	list (APPEND GEN_H ${CMAKE_CURRENT_BINARY_DIR}/${h_file})
endforeach()

set(PACKET_LIBRARY packets)
add_library(${PACKET_LIBRARY} ${GEN_CC})
target_link_libraries(${PACKET_LIBRARY} protobuf)
{'fraction_non_alphanumeric': 0.11591255719369599, 'fraction_numerical': 0.0020335536349771225, 'mean_word_length': 7.374468085106383, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5033492', 'n_tokens_mistral': 813, 'n_tokens_neox': 762, 'n_words': 124}