Add an example pb_syshdr.h file for platforms without C99.
[apps/agl-service-can-low-level.git] / tests / SConstruct
1 env = DefaultEnvironment()
2
3 # Add the builders defined in site_init.py
4 add_nanopb_builders(env)
5
6 # Path to the files shared by tests, and to the nanopb core.
7 env.Append(CPPPATH = ["#../", "#common"])
8
9 # Path for finding nanopb.proto
10 env.Append(PROTOCPATH = ['#../generator', '/usr/include', '.'])
11
12 # Define the include path to find nanopb.proto
13 env.Append(PROTOCPATH = ['#../generator', '/usr/include', '.'])
14
15 # If the platform doesn't support C99, use our own header file instead.
16 conf = Configure(env)
17 if not conf.CheckCHeader('stdbool.h'):
18         conf.env.Append(CPPDEFINES = {'PB_SYSTEM_HEADER': '\\"pb_syshdr.h\\"'})
19         conf.env.Append(CPPPATH = "#../compat")
20 env = conf.Finish()
21
22 # Now include the SConscript files from all subdirectories
23 SConscript(Glob('*/SConscript'), exports = 'env')
24