-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
cmake(enhance):add NuttX CMake extensions module #14747
Conversation
Wrapped CMake native method is nuttx_cmake module It can be quickly called in the build system Signed-off-by: xuxin19 <[email protected]>
[Experimental Bot, please feedback here] No, this PR does not fully meet the NuttX requirements. Here's why:
Here's how you can improve the PR description: Example of Improved PR DescriptionSummary[Enhancement] This PR introduces a new CMake module, This simplifies the creation and configuration of libraries and applications within the NuttX build system, as demonstrated in the example below. Example: # Before: apps/libfoo/CMakeLists.txt
# ... (lengthy CMake code) ...
# After: apps/libfoo/CMakeLists.txt
nuttx_library_ifdef(CONFIG_LIB_FOO foo)
# ... (simplified CMake code) ... Related NuttX Issue: N/A Impact
TestingI confirm that changes are verified on my local setup and work as intended:
Testing logs before change (apps/examples/hello/CMakeLists.txt):
Testing logs after change (apps/examples/hello/CMakeLists.txt):
By providing concrete details and following the NuttX requirements carefully, you will increase the likelihood of your PR being accepted. Remember to replace the example details with your specific information. |
hi @acassis @anchao @raiden00pl please review whether we can do this. |
@xuxin930 I think it is fine! What was your concern? Since it doesn't disturb the original build system using Makefiles, it is fine for me. |
I am fine with similar implementations, and such syntax is also used extensively in zephyr: |
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.
looks good !
This is great :). |
Summary
[Enhancement]
Wrapped CMake native method is nuttx_cmake module,
It can be quickly called in the build system
Add sanity check for commonly called functions
This will make our build system simpler and more modern :-)
e.g:
Impact
Enhanced cmake module, forward compatibility, no impact on the past
Testing
I haven't made any module changes to use the new extensions,
but I've modified the tests in local apps and it's feasible.
It greatly reduces the amount of code and is elegant enough.