summaryrefslogtreecommitdiffstats
path: root/Tests/FindProtobuf/Test/msgs
diff options
context:
space:
mode:
authorPeter Mitrano <mitranopeter@gmail.com>2017-09-21 13:23:30 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-02 12:08:24 (GMT)
commit1299f4cc5ee5a996b051f7767049e239092a65a0 (patch)
treed3c873f8ec327bc1d094c668a8debb555712ba8f /Tests/FindProtobuf/Test/msgs
parent4e91be95323fa869a82ea59e733a706a5fd3867b (diff)
downloadCMake-1299f4cc5ee5a996b051f7767049e239092a65a0.zip
CMake-1299f4cc5ee5a996b051f7767049e239092a65a0.tar.gz
CMake-1299f4cc5ee5a996b051f7767049e239092a65a0.tar.bz2
FindProtobuf: add flag to allow descriptor files to be generated
- The .desc files will be in the same folder as the generated .cc and .h files. - Paths to generate .desc files are stored in a variable passed in - This is only implemented for C++ - Remove legacy ARGS - Add test that generates and uses C++ protobuf message - Add test that checks that the generated .desc file can be instantiated with DynamicMessageFactory - Add Help rst for new feature
Diffstat (limited to 'Tests/FindProtobuf/Test/msgs')
-rw-r--r--Tests/FindProtobuf/Test/msgs/example.proto6
-rw-r--r--Tests/FindProtobuf/Test/msgs/example_desc.proto10
2 files changed, 16 insertions, 0 deletions
diff --git a/Tests/FindProtobuf/Test/msgs/example.proto b/Tests/FindProtobuf/Test/msgs/example.proto
new file mode 100644
index 0000000..d27262e
--- /dev/null
+++ b/Tests/FindProtobuf/Test/msgs/example.proto
@@ -0,0 +1,6 @@
+syntax = "proto2";
+package example.msgs;
+
+message Example {
+ required int32 data = 1;
+}
diff --git a/Tests/FindProtobuf/Test/msgs/example_desc.proto b/Tests/FindProtobuf/Test/msgs/example_desc.proto
new file mode 100644
index 0000000..4454473
--- /dev/null
+++ b/Tests/FindProtobuf/Test/msgs/example_desc.proto
@@ -0,0 +1,10 @@
+syntax = "proto2";
+package example.msgs;
+
+import "google/protobuf/descriptor.proto";
+
+message ExampleDesc {
+ required int32 data = 1;
+
+ optional google.protobuf.FileDescriptorSet desc = 2;
+}