-
Notifications
You must be signed in to change notification settings - Fork 33
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
New Component (FPP) generation feature #125
Conversation
...iecutter_templates/cookiecutter-fprime-component/{{cookiecutter.component_name}}/docs/sdd.md
Show resolved
Hide resolved
def add_to_cmake(list_file: Path, comp_path: Path): | ||
"""Adds new component or port to CMakeLists.txt""" | ||
print(f"[INFO] Found CMakeLists.txt at '{list_file}'") | ||
def add_to_cmake(list_file: Path, comp_path: Path, project_root: Path = None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function doesn't look like it will work with arbitrary CMake structure.
e.g. it only works with the parent cmake list, not project.cmake
nor if there are empty directories in between.
In other implementations of this we have recursed upward to project root looking for:
- If
project.cmake
then add to it - Else if
CMakeLists.txt
then add to it - Else, repeat on parent directory
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added my take at implementing this, let me know how that looks
fprime-util new
Change Description
fprime-util new --component
changed to generate FPP instead of XML.Future work
Ports are much much easier to create in FPP than in XML and probably do not require a
new --port
functionality. Should we get rid of it? Michael you mentioned anew --module
idea instead.