-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Feature request: support Meson as good as CMake #713
Comments
@detly I think overall I am not against it. If it can work similarly to cmake, then sure, we can just add it. If it ever breaks and you're not there for reference, I could always ask people interested in this to find out what breaks and review a PR from them. So sure, if you feel that it will make your life easier - go for it. But you will have to educate me a bit about Meson in the PR 😉 |
I would be happy to help in that process, I am wanting to switch from cmake to meson but I have a really hard time without proper completion. |
@InfRandomness Yeah, I got derailed from this. But FYI, you can still have completion, you just need to manually run one command. What you need is a Steps are:
{
"settings":
{
"ecc_flags_sources":
[
{
"file": "compile_commands.json",
"search_in": "$project_base_path/build",
}
],
"ecc_use_libclang": true,
}
} You can add any other settings you need too. You should get completion from ECC at this point. |
Oh, that's great, thanks ! :D |
@detly I have did that, and have added include/ as my include directory in meson, but it seems as if ECC does not take that into account because it does not provide completion over my headers in include/
Do you happen to know how I could make this work? |
Funnily enough I don't actually use the However, ECC still works for me, because it's getting the header path from the source files itself (or rather, LLVM is). Since they're relative to the project root, it works all the same. In your case, if there's a manageable number of include directories, you could add them to your settings. For example: {
"settings":
{
"ecc_common_flags":
[
"-I$project_base_path/include",
"-I/usr/include",
"-I/usr/lib/clang/$clang_version/include"
],
}
} |
Alright, I will do that instead. Thanks! |
This doesn't seem to work.
in my .sublime-project file, ECC still does not find my header file. |
Sorry guys, I only now read this thread. @InfRandomness does the solution provided by @detly in #713 (comment) work for you? If not then it would be interesting to see what doesn't work there as at that point it is just about reading that compilation database. Other than that this all comes down to just calling a single command just like we do with cmake. The only compilation is that |
It should work, but right now it isn't.
and here is the content of my .sublime-project
The problem is that ECC is failing to find the Repository.hxx file in the include/ directory from the project root |
(I am happy to do a PR for this, but I wanted to gauge interest first.)
I'm working on a project that uses Meson. Meson generates Ninja, so at the moment I can get ECC integration just by pointing
ecc_flags_sources
at my build directory.But it strikes me that Meson is quite a lot like CMake from ECC's point of view: it runs out-of-tree, so you could just run it in a temporary directory and crib the necessary info like you do with CMake. Then tweaking ECC settings, remembering to run it, etc. becomes a non-issue.
Is this something you'd be interested in? I couldn't promise to be around to maintain it, so it might well increase the amount of stuff you have to maintain, a downside I certainly recognise. OTOH I'd be using it regularly for the foreseeable future.
The text was updated successfully, but these errors were encountered: