Uh oh!
There was an error while loading. Please reload this page.
Added option to pass custom C postprocessor - #1331
Conversation
| add_custom_command( | ||
| OUTPUT ${name}.c | ||
| COMMAND lpython --show-c ${CMAKE_CURRENT_SOURCE_DIR}/${name}.py | ||
| --custom-c-postprocessor ${CMAKE_CURRENT_SOURCE_DIR}/${custom_c_postprocessor} > ${name}.c |
There was a problem hiding this comment.
I think as part of this change, let's not do --show-c, but rather save the result to a file ourselves, so no need for ">" which is quite fragile in build systems.
There was a problem hiding this comment.
I agree. Will do this on Thursday.
There was a problem hiding this comment.
Done. Please check the latest diff and let me know if you have any questions.
certik
commented
Nov 29, 2022
Thanks for this, the other thing we need is to allow passing arguments to the script. I have just refactored such a script so that it accepts an argument of a |
Well what do you think about this - Instead of passing a bunch of arguments to the post processor via LPython, can we just create a |
certik
commented
Dec 5, 2022
Yes, the JSON approach is fine. |
I will test this PR manually and see if it satisfies our use case. |
cc: @certik