Description
Describe the bug
When invoked with multiple files the erpcgen
tool only generates files for the first file.
I would argue that the help page indicates that it is an official feature that you can provide multiple .erpc
files:
usage: erpcgen [-?|--help] [-V|--version] [-o|--output <filePath>]
[-v|--verbose] [-I|--path <filePath>] [-g|--generate <language>]
[-c|--codec <codecType>] [-p|--package <packageName>] files...
To Reproduce
Say I have two .erpc
files; foo.erpc
and bar.erpc
, then when I invoke erpcgen
:
erpcgen -g c src/erpc/foo.erpc src/erpc/bar.erpc
Then it only generates files for foo.erpc
.
Expected behavior
I would expect to have foo_{client,interface,common,etc}.cpp
, as well as bar_{client,server,common,etc}.cpp
files in the output directory.
Desktop (please complete the following information)
- OS: GNU/Linux
- eRPC Version: 1.12.0
Steps you didn't forgot to do
- I checked if there is no related issue opened/closed.
- I checked that there doesn't exist opened PR which is solving this issue.
Additional Notes
A quick and dirty "solution" would be to have a single main.erpc
file that imports the other .erpc
files, but that is suboptimal due to all the generated files would then be named main_{client,interface,common,etc}.cpp
and that just results in confusion when #include
-ing and compilation would compile potentially unused functions.
EDIT: Probably the easiest solution would be to simply say that compiling multiple files is not supported and update the help message.
Activity