Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for specifying which commit/branch of reactor-c to use #2237

Open
erlingrj opened this issue Mar 8, 2024 · 1 comment
Open
Labels
build system c Related to C target feature New feature

Comments

@erlingrj
Copy link
Collaborator

erlingrj commented Mar 8, 2024

With the Cpp-target we can instruct lfc to compile the generated application with a specific commit/branch of reactor-cpp, or with reactor-cpp located at a certain location. (@cmnrd is that accurate?). Using CMake (i.e. not done from lfc), reactor-cpp is then cloned and checked out at the right commit. This would be great to support for reactor-c also. There are a few problems:

  • We don't really copy reactor-c in as a submodule, rather we copy in most of the subdirectories of reactor-c to src-gen. I think this is a little odd and we should probably move to a copying the entire reactor-c into a directory in src-gen.
  • This would be hard to support for Ardunio which requires modifying all include statements and removing all source files which is not to be compiled.
@erlingrj erlingrj added c Related to C target build system feature New feature labels Mar 8, 2024
@cmnrd
Copy link
Collaborator

cmnrd commented Mar 11, 2024

Yes, the runtime-version property allows setting a specific git commit ref for the reactor-cpp runtime, without modifying the submodule version. I use this a lot when developing new features in reactor-cpp. The property can both be set in an LF files target properties or using a command line argument to lfc. Leveraging the current cmake structure for the C++ target, this mechanism can even keep multiple different compiled versions and switch between them without recompiling everything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system c Related to C target feature New feature
Projects
None yet
Development

No branches or pull requests

2 participants