Hi, I'm rather confused about what should be generating headers and source when both zproto and zproject are used.
Trying three ways:
1:
(rm all generated source and headers)
gsl project.xml
2:
(rm all generated source and headers)
gsl project.xml
make code
3:
(rm all generated source and headers)
gsl project.xml
(rm generated src/*_{client,server,proto}*.{inc,hpp,cpp}
cd src && gsl *.xml
It's the last that seems to produce the best code.
The source generated by just "gsl project.xml" lacks some of the
niceties of the version that "cd src && gsl *.xml" provides such as more
contents in the initial private structs.
I found this past message which seems to speak to the issue:
https://zeromq-dev.zeromq.narkive.com/uiD9AXgS/czmq-code-generation
Should #3 be what is baked into "make code"?
Or, is it that a new project supposed to do a one-time explicit
cd src && gsl *.xml
then rely on the fact that subsequent "make code" will not rewrite the
source?
A minor secondary problem is that "make code" causes the "proto" header
to be generated by zproject while zproto's version has a nice comment
block describing all the messages.
So, I think that the Makemodule.am file should change from:
code:
cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q zperf_msg.xml
cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q zperf_server.xml
cd $(srcdir)/src; gsl -topdir:.. -zproject:1 -q zperf_client.xml
cd $(srcdir); gsl -target:- project.xml
to:
code:
cd $(srcdir); gsl -target:- project.xml
cd $(srcdir)/src; gsl -topdir:.. -q zperf_msg.xml
cd $(srcdir)/src; gsl -topdir:.. -q zperf_server.xml
cd $(srcdir)/src; gsl -topdir:.. -q zperf_client.xml
(where "zperf" is my project)
Thanks,
-Brett.
signature.asc
Description: PGP signature
_______________________________________________ zeromq-dev mailing list [email protected] https://lists.zeromq.org/mailman/listinfo/zeromq-dev
