Skip to content

Commit

Permalink
Add .proto files to extract_includes.bat
Browse files Browse the repository at this point in the history
For google/or-tools, on windows, we need to use `import "google/protobuf/wrappers.proto";` since we want "optional" int64 and in version3 POD get default value...
-> so we use "google.protobuf.Int64Value" since 0 is a valid value and different from "not set" for our use case.
  • Loading branch information
Mizux authored and Mizux committed Apr 24, 2018
1 parent 4ca46ed commit 3ad8efc
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
15 changes: 15 additions & 0 deletions cmake/extract_includes.bat.in
Original file line number Diff line number Diff line change
Expand Up @@ -111,3 +111,18 @@ copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\wire_format.h" includ
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\wire_format_lite.h" include\google\protobuf\wire_format_lite.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\wire_format_lite_inl.h" include\google\protobuf\wire_format_lite_inl.h
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\wrappers.pb.h" include\google\protobuf\wrappers.pb.h
mkdir include\google
mkdir include\google\protobuf
mkdir include\google\protobuf\compiler
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\any.proto" include\google\protobuf\any.proto
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\api.proto" include\google\protobuf\api.proto
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\compiler\plugin.proto" include\google\protobuf\compiler\plugin.proto
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\descriptor.proto" include\google\protobuf\descriptor.proto
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\duration.proto" include\google\protobuf\duration.proto
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\empty.proto" include\google\protobuf\empty.proto
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\field_mask.proto" include\google\protobuf\field_mask.proto
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\source_context.proto" include\google\protobuf\source_context.proto
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\struct.proto" include\google\protobuf\struct.proto
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\timestamp.proto" include\google\protobuf\timestamp.proto
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\type.proto" include\google\protobuf\type.proto
copy "${PROTOBUF_SOURCE_WIN32_PATH}\..\src\google\protobuf\wrappers.proto" include\google\protobuf\wrappers.proto
11 changes: 11 additions & 0 deletions update_file_lists.sh
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,17 @@ for HEADER in $PUBLIC_HEADERS; do
WINPATH=$(echo $HEADER | sed 's;/;\\;g')
echo "copy \"\${PROTOBUF_SOURCE_WIN32_PATH}\\..\\src\\$WINPATH\" include\\$WINPATH" >> $EXTRACT_INCLUDES_BAT
done
for PROTO in ${WKT_PROTOS}; do
PROTO_DIR=$(dirname "$PROTO")
while [ ! "$PROTO_DIR" = "." ]; do
echo "mkdir include\\${PROTO_DIR//\//\\}"
PROTO_DIR=$(dirname "$PROTO_DIR")
done
done | sort | uniq >> $EXTRACT_INCLUDES_BAT
for PROTO in $WKT_PROTOS; do
WINPATH=${PROTO//\//\\}
echo "copy \"\${PROTOBUF_SOURCE_WIN32_PATH}\\..\\src\\$WINPATH\" include\\$WINPATH" >> $EXTRACT_INCLUDES_BAT
done

################################################################################
# Update bazel BUILD files.
Expand Down

0 comments on commit 3ad8efc

Please sign in to comment.