Files
nanopb/tests/SConstruct
Petteri Aimonen e681dd0d75 Add an example pb_syshdr.h file for platforms without C99.
This allows building the tests easily on Visual C++ in C mode.

Also add checks to pb.h that the defined integer types are of
the proper sizes. This may prevent some difficult to debug problems
later..
2013-09-10 12:39:39 +03:00

25 lines
788 B
Python

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')