Add GENERATE_PARSER_OUTPUT_DIR argument to yarp_prepare_plugin function#3229
Add GENERATE_PARSER_OUTPUT_DIR argument to yarp_prepare_plugin function#3229traversaro wants to merge 1 commit intorobotology:masterfrom
Conversation
04e4b7f to
65b9270
Compare
65b9270 to
c2e4368
Compare
This parameter can be used to (optionally) generate the files related to device param parser in an arbitrary location. This is tipically used to generate the files in the build directory instead of the source one, removing the need of committing generate files in the repo.
c2e4368 to
64c6ca0
Compare
|
|
While I like this idea, I have also realized that those .h and .cpp files will (still) be regenerated on every CMake run, thus updating the generation timestamp in the header, thus forcing recompilation of all devices that use this mechanism. Would it be possible to only regenerate/compile them when changes are applied to the .md file? Edit: since I am implementing mesh-iit/ergocub-software#310 as a workaround for YARP 3.12, I forgot that (in the usual scenario) generation would be enabled explicitly via setting |



This parameter can be used to (optionally) generate the files related to device param parser in an arbitrary location. This is typically used to generate the files in the build directory instead of the source one, removing the need of committing generate files in the repo, avoiding problems such as the one discussed in mesh-iit/ergocub-software#310 and #3225 (comment) .
The change is completely backward compatible, and an example of its use can be found in traversaro/ergocub-software@d811e32, from which this snippet is extracted:
I am aware that there is currently a PR freeze (see #3227 (comment)), but I preferred to open a PR before I moved to work on something else, to avoid forgetting about it, so that the PR will be ready once the PR will be accepted again.
fyi @pattacini @Nicogene @PeterBowman @MSECode