File tree 3 files changed +37
-0
lines changed
3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -75,13 +75,21 @@ script:
75
75
- cd build
76
76
- cmake --build . --target install
77
77
- cd ..
78
+ - cp VERSION VERSION.SAVED
78
79
- echo "" >> VERSION
79
80
- echo "VERSION_PATCH = \"GitHub_MasterBranch\"" >> VERSION
80
81
- cd build
81
82
- cmake -D FILTER_PROTO2CPP_PY_PATH=${DEPS_DIR}/proto2cpp ..
82
83
- doxygen
83
84
- cd ..
84
85
- python test_cases_doc.py
86
+ - mv VERSION.SAVED VERSION
87
+ - sh convert-to-proto3.sh
88
+ - mkdir -p build3
89
+ - cd build3
90
+ - cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install ..
91
+ - cmake --build .
92
+ - cd ..
85
93
86
94
# Deploy the documentation on github (only for master branch).
87
95
deploy :
Original file line number Diff line number Diff line change @@ -75,6 +75,16 @@ The compatibility of both recorded files and code remains.
75
75
- Clarification of text passages explaining the message content
76
76
77
77
78
+ Proto3 Support
79
+ --------------
80
+
81
+ For users that need to use proto3 syntax, for example because the language
82
+ binding of choice only supports proto3 syntax out of the box, a shell script
83
+ called ` convert-to-proto3.sh ` is supplied that converts all proto files to
84
+ proto3 syntax. If this is run prior to building, the resulting libaries will
85
+ use proto3, with the on-the-wire format remaining compatible between proto2
86
+ and proto3 libraries.
87
+
78
88
Packaging
79
89
---------
80
90
Original file line number Diff line number Diff line change
1
+ #! /bin/sh
2
+
3
+ # This shell script converts all proto files to proto3 syntax, which can
4
+ # then be used as a stand in for the proto2 syntax files. The resulting
5
+ # on-the-wire format should be compatible with the proto2-based formats
6
+ # in all respects.
7
+ #
8
+ # Call this script prior to building normally if you want/need to use
9
+ # proto3 syntax, e.g. for language bindings that do not support proto2,
10
+ # like C#.
11
+
12
+ test -f osi_version.proto && rm osi_version.proto
13
+
14
+ for f in osi_version.proto.in osi_* .proto
15
+ do
16
+ mv $f $f .pb2 && sed -e ' s/syntax *= *"proto2";/syntax = "proto3";/' -e ' s/^\([ \t]*\)optional /\1/' $f .pb2 > $f
17
+ done
18
+
19
+ mv CMakeLists.txt CMakeLists.txt.pb2 && sed -e ' s/find_package(Protobuf 2.6.1 REQUIRED)/find_package(Protobuf 3.0.0 REQUIRED)/' CMakeLists.txt.pb2 > CMakeLists.txt
You can’t perform that action at this time.
0 commit comments