From aa89232c72b324417aab1ac5db85db84551b9725 Mon Sep 17 00:00:00 2001 From: Morten Borup Petersen Date: Tue, 3 Sep 2024 15:48:26 +0200 Subject: [PATCH 1/2] Don't concatenate paths in `--proto_path` `protoc`'s `--proto_path` argument is expected to be provided multiple times if multiple directories are to be considered. Concatenating with `:` is invalid on some systems (Windows): ```sh > protoc --help -IPATH, --proto_path=PATH Specify the directory in which to search for imports. May be specified multiple times; directories will be searched in order. If not given, the current working directory is used. If not found in any of the these directories, the --descriptor_set_in descriptors will be checked for required proto file. ``` --- src/substrait/proto/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/substrait/proto/CMakeLists.txt b/src/substrait/proto/CMakeLists.txt index c6efa852..390cace8 100644 --- a/src/substrait/proto/CMakeLists.txt +++ b/src/substrait/proto/CMakeLists.txt @@ -67,7 +67,8 @@ foreach(PROTO_FILE IN LISTS PROTOBUF_FILELIST) OUTPUT ${PROTO_SRC} ${PROTO_HDR} COMMAND protobuf::protoc - "--proto_path=${GENERATED_PROTO_TOPLEVEL_DIR}:${protobuf_SOURCE_DIR}/src" + "--proto_path=${GENERATED_PROTO_TOPLEVEL_DIR}" + "--proto_path=${protobuf_SOURCE_DIR}/src" "--cpp_out=${PROTO_OUTPUT_MIDLEVEL_DIR}" ${GENERATED_PROTO_FILE} DEPENDS ${GENERATED_PROTOBUF_LIST} protobuf::protoc COMMENT "Generated C++ protobuf module for ${PROTO_FILE}" From 50f5e1b408bcff0befd3999bc13af4665721428b Mon Sep 17 00:00:00 2001 From: Morten Borup Petersen Date: Wed, 4 Sep 2024 09:42:18 +0200 Subject: [PATCH 2/2] format --- src/substrait/proto/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/substrait/proto/CMakeLists.txt b/src/substrait/proto/CMakeLists.txt index 390cace8..d6eb06bd 100644 --- a/src/substrait/proto/CMakeLists.txt +++ b/src/substrait/proto/CMakeLists.txt @@ -66,8 +66,7 @@ foreach(PROTO_FILE IN LISTS PROTOBUF_FILELIST) add_custom_command( OUTPUT ${PROTO_SRC} ${PROTO_HDR} COMMAND - protobuf::protoc - "--proto_path=${GENERATED_PROTO_TOPLEVEL_DIR}" + protobuf::protoc "--proto_path=${GENERATED_PROTO_TOPLEVEL_DIR}" "--proto_path=${protobuf_SOURCE_DIR}/src" "--cpp_out=${PROTO_OUTPUT_MIDLEVEL_DIR}" ${GENERATED_PROTO_FILE} DEPENDS ${GENERATED_PROTOBUF_LIST} protobuf::protoc