mirror of
https://github.com/google/pebble.git
synced 2025-05-29 06:23:13 +00:00
Import of the watch repository from Pebble
This commit is contained in:
commit
3b92768480
10334 changed files with 2564465 additions and 0 deletions
28
third_party/nanopb/tests/cxx_descriptor/SConscript
vendored
Normal file
28
third_party/nanopb/tests/cxx_descriptor/SConscript
vendored
Normal file
|
@ -0,0 +1,28 @@
|
|||
# Test cxx descriptor functionality
|
||||
|
||||
Import('env')
|
||||
|
||||
base_env = env.Clone()
|
||||
base_env.Replace(NANOPBFLAGS = '--cpp-descriptor')
|
||||
base_env.NanopbProto('message')
|
||||
|
||||
for std in ["c++03", "c++11", "c++14", "c++17", "c++20"]:
|
||||
e = base_env.Clone()
|
||||
e.Append(CXXFLAGS = '-std={}'.format(std))
|
||||
|
||||
# Make sure compiler supports this version of C++ before we actually run the
|
||||
# test.
|
||||
conf = Configure(e)
|
||||
compiler_valid = conf.CheckCXX()
|
||||
e = conf.Finish()
|
||||
if not compiler_valid:
|
||||
print("Skipping {} test - compiler doesn't support it".format(std))
|
||||
continue
|
||||
|
||||
if std == 'c++03':
|
||||
e.Append(CPPDEFINES = {'PB_C99_STATIC_ASSERT': 1})
|
||||
|
||||
o1 = e.Object('message_descriptor_{}'.format(std), 'message_descriptor.cc')
|
||||
o2 = e.Object('message.pb_{}'.format(std), 'message.pb.c')
|
||||
p = e.Program([o1, o2])
|
||||
e.RunTest(p)
|
Loading…
Add table
Add a link
Reference in a new issue