Hi, all I am trying to use the clangd LSP server during development for my C++ CMake project. I have determined if I place the following snippet after my project directive,
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) if(CMAKE_EXPORT_COMPILE_COMMANDS) set(CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES ${CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES}) endif() then the LSP will work correctly. However, I do not wish to do this for a few reasons.. - These steps are not pertinent to my build, only to my development - It is not kosure to modify the CMAKE_CXX_STANDARD_INCLUDE_DIRECTORIES <https://cmake.org/cmake/help/latest/variable/CMAKE_LANG_STANDARD_INCLUDE_DIRECTORIES.html> . I noticed $OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake.d/*.cmake is included when specifying the $OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake. So, I've added $OECORE_NATIVE_SYSROOT/usr/share/cmake/OEToolchainConfig.cmake.d/ clangd.cmake. However, this does not completely work... - I have to cmake twice before compile_commands.json shows up.. - The clangd fails to find system includes and stl headers. What can I do to resolve these issues? All the best, Logan
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#61630): https://lists.yoctoproject.org/g/yocto/message/61630 Mute This Topic: https://lists.yoctoproject.org/mt/102438658/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-