File: SConscript

package info (click to toggle)
nanopb 0.4.9.1-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,676 kB
  • sloc: ansic: 12,144; python: 2,795; cpp: 190; sh: 163; makefile: 85
file content (21 lines) | stat: -rw-r--r-- 593 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Example / test for handling 'map' type using the backwards compatibility
# in protobuf specification:
# https://developers.google.com/protocol-buffers/docs/proto3#maps

Import('env')

env.NanopbProto(['map', 'map.options'])

enc = env.Program(['encode_map.c',
                'map.pb.c',
                '$COMMON/pb_encode.o',
                '$COMMON/pb_common.o'])

dec = env.Program(['decode_map.c',
                'map.pb.c',
                '$COMMON/pb_decode.o',
                '$COMMON/pb_common.o'])

env.RunTest("message.pb", enc)
env.RunTest("message.txt", [dec, 'message.pb'])