-
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/mkconfig: add support of set custom command options to config.h #15594
Conversation
add support of set custom command options to config.h Use the -D parameter to pass the config to header file. NOTE which must begin with the CONFIG_ prefix. eg: cmake -DCONFIG_AAA=1 -DCONFIG_BBB=1 -B build -DBOARD_CONFIG=sim/nsh -GNinja Signed-off-by: chao an <[email protected]>
[Experimental Bot, please feedback here] This PR does not fully meet the NuttX requirements. While it provides a summary of the change and testing results, it lacks crucial information in the Impact section. Here's a breakdown: Missing Information:
Insufficient Information:
Recommendations for Improvement:
By addressing these points, the PR will be much more likely to be accepted. Clear and thorough documentation of changes is crucial for open-source projects. |
@anchao does it also work for standard makefiles ? |
@acassis Makefiles already have this feature, but due to different backend implementations, makefile use EXTRAFLAGS to pass special definitions:
(I remember you had a related wiki introducing this feature before :) |
I don't remember, but I remember using EXTRALIB flag sometime ago, hehehe |
@acassis here it is On second thought, would it be better to use EXTRAFLAGS in cmake? |
Summary
cmake/mkconfig: add support of set custom command options to config.h
add support of set custom command options to config.h
Use the -D parameter to pass the config to header file.
NOTE which must begin with the CONFIG_ prefix.
eg:
source file:
output:
Signed-off-by: chao an [email protected]
Impact
N/A
Testing
ci-check