summaryrefslogtreecommitdiffstats
path: root/tests/SConstruct
blob: a690aff058eda8d6b0cd48c5c02949e7504833a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
env = DefaultEnvironment()

# Add the builders defined in site_init.py
add_nanopb_builders(env)

# Path to the files shared by tests, and to the nanopb core.
env.Append(CPPPATH = ["#../", "#common"])

# Path for finding nanopb.proto
env.Append(PROTOCPATH = ['#../generator', '/usr/include', '.'])

# Define the include path to find nanopb.proto
env.Append(PROTOCPATH = ['#../generator', '/usr/include', '.'])

# If the platform doesn't support C99, use our own header file instead.
conf = Configure(env)
if not conf.CheckCHeader('stdbool.h'):
	conf.env.Append(CPPDEFINES = {'PB_SYSTEM_HEADER': '\\"pb_syshdr.h\\"'})
	conf.env.Append(CPPPATH = "#../compat")
env = conf.Finish()

# Now include the SConscript files from all subdirectories
SConscript(Glob('*/SConscript'), exports = 'env')