-
-
Notifications
You must be signed in to change notification settings - Fork 1k
CMake Presets json file #2308
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
base: main
Are you sure you want to change the base?
CMake Presets json file #2308
Conversation
Build size and comparison to main:
|
456bffb
to
be8636c
Compare
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 like a nice improvement overall :) Thanks for sending it in
I'm not sure about storing the toolchain inside the tree. Maybe environment variables like with the VSCode instructions would be more flexible? What are your thoughts, I do agree that having to configure env vars can be a bit annoying
CMakeUserPresets.json contains user (i.e. per developer) presets and should therefore be ignored. node_modules and so on is just for the lv_font_conv dependency.
This file helps editors to generate compile_commands.json database files as well as streamlining some of the cmake commands.
be8636c
to
a7d43cf
Compare
Thanks! 😁 Hmm... I see your point that using raw environment variables is very flexible, I just found it a bit annoying to use though - which is why I added the cmake presets file... These changes will technically not prevent users from manually setting the environment variables and calling To me, ideally, the buildsteps should just be:
Where the CMakeLists.txt would download the SDK and toolchain for you at configure-time. I would love to try to get that done but it would require touching the CI and it would be a fairly big change to the now normal work flow, so I'm not sure if it would be too disruptive. Perhaps adding the presets just adds confusion and we should just close this PR? |
This PR adds a
CMakePresets.json
with theRelease
preset , which makes it much easier to get started on development, as code-editors such as VSCode, CLion and neovim support generatingcompile_commands.json
databases using these presets. It does require a fairly recent cmake version though.I only added one preset,
Release
for now and I didn't dare touch the CI stuff, but perhaps this could simplify the CI chain.I also found that the
requirements.txt
file intools/mcuboot
didn't mention theadafruit-nrfutil
dependency, so I added that to the build instructions.