I am trying to get the c++ language server working with emacs. I work in high performance computing, so my toolchains are vastly different from project to project. When using the lsp mode in emacs (cc +lsp), it selects gcc-12 on my system as the compiler to use with clangd.
What happened?
{{{Clangd auto selects gcc_12 as the default compiler on my system.}}}
What did you expect to happen?
{{{Since compile_commands.json has icpx (Intel Compiler) selected, I expect clangd to get libraries from Intel compilers instead of gcc.}}}
Steps to reproduce
- Generate a compile_commands.json with a different compiler or libraries selected (I used bear on my Makefile)
- use doom emacs to start lsp server. init.el should have (cc +lsp)
- If libstdc++ is not installed for gcc (in my case gcc_12) the include will show file not found. But the compiler used in my case icpx, is able to compile and run the code successfully.
System information
Loading data dump...