<commit_before>#set(ProtobufIncludePath ${CMAKE_CURRENT_BINARY_DIR}
#  CACHE INTERNAL "Path to generated protobuf files.")

file(GLOB proto-schema *.proto)

foreach(proto IN ITEMS ${proto-schema})
  get_filename_component(proto-stub ${proto} NAME)
  string(REGEX REPLACE ".proto$" ".pb.h" proto-hpp ${proto-stub})
  list(APPEND proto-hpp-list ${PROJECT_BINARY_DIR}/src/stan/proto/${proto-hpp})
  string(REGEX REPLACE ".proto$" ".pb.cc" proto-cpp ${proto-stub})
  list(APPEND proto-cpp-list ${PROJECT_BINARY_DIR}/src/stan/proto/${proto-cpp})
  message("PROTO_HPP: " ${proto-hpp})
  message("PROTO_CPP: " ${proto-cpp})
  add_custom_command(
    OUTPUT ${proto-hpp} ${proto-cpp}
    COMMAND protoc --cpp_out=${PROJECT_BINARY_DIR}/src/stan/proto
    --proto_path=${PROJECT_SOURCE_DIR}/proto ${proto}
    DEPENDS ${proto-schema}
  )
endforeach(proto)

#find_package(Protobuf REQUIRED)
#protobuf_generate_cpp(PROTO_CPP_SRC PROTO_HPP_SRC ${proto-schema})


add_custom_target(
  proto-headers ALL DEPENDS ${proto-hpp-list} ${proto-cpp-list} protobuf
)<commit_msg>More cmake.<commit_after>#set(ProtobufIncludePath ${CMAKE_CURRENT_BINARY_DIR}
#  CACHE INTERNAL "Path to generated protobuf files.")

file(GLOB proto-schema *.proto)

foreach(proto IN ITEMS ${proto-schema})
  get_filename_component(proto-stub ${proto} NAME)
  string(REGEX REPLACE ".proto$" ".pb.h" proto-hpp ${proto-stub})
  list(APPEND proto-hpp-list ${PROJECT_BINARY_DIR}/src/stan/proto/${proto-hpp})
  string(REGEX REPLACE ".proto$" ".pb.cc" proto-cpp ${proto-stub})
  list(APPEND proto-cpp-list ${PROJECT_BINARY_DIR}/src/stan/proto/${proto-cpp})
  message("PROTO_HPP: " ${proto-hpp})
  message("PROTO_CPP: " ${proto-cpp})
endforeach(proto)

#find_package(Protobuf REQUIRED)
#protobuf_generate_cpp(PROTO_CPP_SRC PROTO_HPP_SRC ${proto-schema})

add_custom_command(
  OUTPUT ${proto-hpp-list} ${proto-cpp-list}
  COMMAND protoc --cpp_out=${PROJECT_BINARY_DIR}/src/stan/proto
  --proto_path=${PROJECT_SOURCE_DIR}/proto ${proto}
  DEPENDS ${proto}
)

add_custom_target(
  proto-headers ALL DEPENDS ${proto-hpp-list} ${proto-cpp-list} protobuf
)
{'fraction_non_alphanumeric': 0.15912339209147214, 'fraction_numerical': 0.0, 'mean_word_length': 5.774193548387097, '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': '3353032', 'n_tokens_mistral': 777, 'n_tokens_neox': 764, 'n_words': 131}