You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, to use Clangd's LSP feature, I set set(CMAKE_EXPORT_COMPILE_COMMANDS ON) in CMakeLists.txt. This makes the compile commands to be written to the compile_commands.json file, which helps the language server understand the project structure.
However, using cmrc_add_resource_library() in CMakeLists.txt causes some header files to not recognize other header files. For example, the project structure is as follows
First of all, to use Clangd's LSP feature, I set
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
in CMakeLists.txt. This makes the compile commands to be written to the compile_commands.json file, which helps the language server understand the project structure.However, using
cmrc_add_resource_library()
in CMakeLists.txt causes some header files to not recognize other header files. For example, the project structure is as followsin this case, if header1.h imports header2.h, LSP says it could not find the file. (However, it will compile and build normally!)
The text was updated successfully, but these errors were encountered: