Added option to pass custom C postprocessor#1331
Added option to pass custom C postprocessor#1331czgdp1807 wants to merge 2 commits intolcompilers:mainfrom
Conversation
integration_tests/CMakeLists.txt
Outdated
| 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.
|
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 |
76883ff to
bd88467
Compare
bd88467 to
004a1af
Compare
|
Yes, the JSON approach is fine. |
|
I will test this PR manually and see if it satisfies our use case. |
cc: @certik