[Yunq] Only generate client and server files if an interface exists.

This commit is contained in:
Drew Galbraith 2024-01-17 13:56:22 -08:00
parent fecaa387b0
commit e83720e67c
1 changed files with 3 additions and 0 deletions

View File

@ -45,6 +45,9 @@ def main():
message_impl = message_impl_tmpl.render(file=filebase, messages=messages, package=package)
f.write(message_impl)
if len(interfaces) == 0:
return
client_header_tmpl = jinja_env.get_template("client.h.jinja")
with open(filename + '.client.h', mode='w') as f:
client_header = client_header_tmpl.render(file=filebase, interfaces=interfaces, package=package)