-
Notifications
You must be signed in to change notification settings - Fork 57
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 compilation database support #40
Comments
Thanks for the suggestion. I will look into this. I think that the manual config file is probably fine for 99% of projects, since you only need to specify directories/files if you want to exclude subdirectories of the project root. However, there may be some projects with complicated structures (likely using CMake) that would benefit from this more automated approach. |
Yes you are probably right about that percentage number. Another advantage of the compilation database are that all compiler arguments |
Actually, the only diagnostics currently implemented are simple ones that can be derived from the language server's internal representation of the code. At some point it would be nice to add a more complete set of diagnostics using compilers if a user provided the necessary build information as you described. |
You may check out https://github.com/nickdiego/compiledb and Buiding EAR. |
One practical use case for this could be to extract the preprocessor definitions from the compiler command line per file and use them instead of the static ones from My only concern in general is that CMake doesn't produce this compilation db file by default which would limit the out-of-the-box experience. |
Currently the language server supports 'only' a manually generated configuration file
for communicating the file hierarchy. With CMake it's possible to generate a compilation database with contains all flags, directories, etc. for
a given file. It would be nice for CMake user to add the reading of this database.
The text was updated successfully, but these errors were encountered: