pull/15/head
parent
292ad6009c
commit
c9cb49764b
4 changed files with 25 additions and 0 deletions
@ -0,0 +1,3 @@ |
||||
message Dummy { |
||||
required string text = 1; |
||||
} |
@ -0,0 +1,6 @@ |
||||
#include "defs.pb.h" |
||||
|
||||
int main(int argc, char **argv) { |
||||
Dummy d; |
||||
return 0; |
||||
} |
@ -0,0 +1,14 @@ |
||||
project('protocol buffer test', 'cxx') |
||||
|
||||
protoc = find_program('protoc', required : true) |
||||
dep = find_dep('protobuf', required : true) |
||||
|
||||
gen = generator(protoc, \ |
||||
output_name : '@BASENAME@.pb.cc', |
||||
arguments : ['-I=@SOURCE_DIR@', '--cpp_out=@BUILD_DIR@', '@INPUT@']) |
||||
|
||||
generated = gen.process('defs.proto') |
||||
e = executable('prog', 'main.cpp', generated, |
||||
include_dirs: include_directories('.'), |
||||
dep : dep) |
||||
add_test('prototest', e) |
Loading…
Reference in new issue