-
-
Notifications
You must be signed in to change notification settings - Fork 398
Add support for compile_command.json output #1081
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
Conversation
This is still very rough and unfinished.
Also slightly refactore code
08eb89d
to
a22edfa
Compare
I finally gotten around to giving this code a whirl, seems to work nicely overall. There's still some points unsolved from #944, but let's further discuss them in #849. Why did you removing the "Writing compilation database..." message? IMHO it helps to both let people know that this feature is supported in the first place, and helps figure out where the file was written to, especially now it's only written to the build folder. In verbose mode, all commands run are printed, then why not show the compilation database was generated? |
Mainly because:
BTW, you have a good point, I'll put a message output on the caller side. |
This implementation is a tentative draft based on @matthijskooijman's #944
I've added a flag
--only-compilation-database
flag incompile
command. When this flag is specified the build run will perform only:sketch.ino.cpp
is saved in the usual${build_path}/sketch/...
subdir)compile_command.json
(saved in the build-path). In this case the sketch/core/libraries are not compiled but the command line is saved forcompile_command.json