diff options
Diffstat (limited to 'meson/test cases/frameworks/5 protocol buffers/asubdir')
3 files changed, 22 insertions, 0 deletions
diff --git a/meson/test cases/frameworks/5 protocol buffers/asubdir/defs.proto b/meson/test cases/frameworks/5 protocol buffers/asubdir/defs.proto new file mode 100644 index 000000000..dad575470 --- /dev/null +++ b/meson/test cases/frameworks/5 protocol buffers/asubdir/defs.proto @@ -0,0 +1,5 @@ +syntax = "proto3"; + +message Dummy { + string text = 1; +} diff --git a/meson/test cases/frameworks/5 protocol buffers/asubdir/main.cpp b/meson/test cases/frameworks/5 protocol buffers/asubdir/main.cpp new file mode 100644 index 000000000..f6566d52e --- /dev/null +++ b/meson/test cases/frameworks/5 protocol buffers/asubdir/main.cpp @@ -0,0 +1,9 @@ +#include "defs.pb.h" + +int main(int argc, char **argv) { + GOOGLE_PROTOBUF_VERIFY_VERSION; + Dummy *d = new Dummy; + delete d; + google::protobuf::ShutdownProtobufLibrary(); + return 0; +} diff --git a/meson/test cases/frameworks/5 protocol buffers/asubdir/meson.build b/meson/test cases/frameworks/5 protocol buffers/asubdir/meson.build new file mode 100644 index 000000000..972716590 --- /dev/null +++ b/meson/test cases/frameworks/5 protocol buffers/asubdir/meson.build @@ -0,0 +1,8 @@ +subdirgen = generator(protoc, \ + output : ['@BASENAME@.pb.cc', '@BASENAME@.pb.h'], + arguments : ['--proto_path=@CURRENT_SOURCE_DIR@', '--cpp_out=@BUILD_DIR@', '@INPUT@']) + +generated = subdirgen.process('defs.proto') +e = executable('subdir-prog', 'main.cpp', generated, + dependencies : dep) +test('subdir-prototest', e) |